Let's define the score of sequence A of length M the maximal number T such that there exist a sequence B of length T with 1=B1<B2<⋯<BT≤M and Bi is the smallest index bigger than Bi−1 with ABi−1≤ABi.
A sequence S of length N is randomly generated in the following way:
⋅ For each index i we assign V (1≤V≤K) to Si with probability pV.
Find the expected score of S modulo 109+7.
Input
The first line contains two integers - N,K(1≤N≤109,1≤K≤75).
The next line contains K nonegative integers - q1,q2,…,qk, pi=qiq1+q2+⋯+qk (1≤q1+q2+⋯+qk≤109).
Output
It can be proved that the answer can be represented as a fraction PQ with Q≠0 and (P,Q)=1. Output the reminder of P⋅Q−1 when divided by 109+7.
Consider the following sequences:
1. (1,1,1) appears with probability 127 and has score 3
2. (1,1,2) appears with probability 227 and has score 3
3. (1,2,1) appears with probability 227 and has score 2
4. (1,2,2) appears with probability 427 and has score 3
5. (2,1,1) appears with probability 227 and has score 1
6. (2,1,2) appears with probability 427 and has score 2
7. (2,2,1) appears with probability 427 and has score 2
8. (2,2,2) appears with probability 827 and has score 3