If you have gone that far, you'll probably skip unnecessary legends anyway...
You are given a binary string

and an integer

. Find the number of integers
k,
0≤k<N, such that for all
i=0,
1, ...,
m-1

Print the answer modulo
109+7.
Output
A single integer− the answer to the problem.