Measure trunk
We'll call a trunk of a rooted tree the set of nodes in the tree that are at a distance at most from the root. The distance is the sum of the lengths of edges on the path between nodes.
Imagine an infinite rooted tree where each node has exactly sons, at that for each node, the distance between it and its -th left child equals to . The task is to calculate the size of the trunk of such tree.
As the answer can be rather large, find it modulo .
Input
The first line contains two space-separated integers and — the number of children of each node and the distance from the root within the range of which you need to count the nodes.
The next line contains space-separated integers — the length of the edge that connects each node with its -th child.
Output
Print a single number — the number of vertices in the tree at distance from the root equal to at most .
Examples
Pictures to the sample (the yellow color marks the nodes the distance to which is at most three)