n,m = list(map(int,input().split()))

aa = [int(eval(input())) for i in range(m)]



cnt2 = 0

cnt1 = 1

aa.append(-1)

a = aa.pop(0)





for i in range(1,n):

    if i == a:

        cnt2, cnt1 = cnt1, 0

        a = aa.pop(0)

    else:

        cnt2, cnt1 = cnt1, cnt2+cnt1

else:

    ans = (cnt2+cnt1)%1000000007



print(ans)
n,m = list(map(int,input().split()))

a = [int(eval(input())) for _ in range(m)]

a.append(-1)

idx = 0

mod = 10**9+7

dp = [0]*(n+1)



dp[0] = 1

if a[idx] == 1: idx += 1

else: dp[1] = 1



for i in range(2,n+1):

    if i == a[idx]:

        dp[i] = 0

        idx += 1

    else:

        dp[i] = (dp[i-1] + dp[i-2])%mod

        

print((dp[n]))
n, m = list(map(int, input().split()))
aa = [int(eval(input())) for i in range(m)]
cnt2 = 0
cnt1 = 1
aa.append(-1)
a = aa.pop(0)
for i in range(1, n):
    if i == a:
        cnt2, cnt1 = cnt1, 0
        a = aa.pop(0)
    else:
        cnt2, cnt1 = cnt1, cnt2 + cnt1
else:
    ans = (cnt2 + cnt1) % 1000000007
print(ans)

n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
a.append(-1)
idx = 0
mod = 10**9 + 7
dp = [0] * (n + 1)
dp[0] = 1
if a[idx] == 1:
    idx += 1
else:
    dp[1] = 1
for i in range(2, n + 1):
    if i == a[idx]:
        dp[i] = 0
        idx += 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print((dp[n]))

-aa = [int(eval(input())) for i in range(m)] -cnt2 = 0 -cnt1 = 1 -aa.append(-1) -a = aa.pop(0) -for i in range(1, n): -    if i == a: -        cnt2, cnt1 = cnt1, 0 -        a = aa.pop(0) +a = [int(eval(input())) for _ in range(m)] +a.append(-1) +idx = 0 +mod = 10**9 + 7 +dp = [0] * (n + 1) +dp[0] = 1 +if a[idx] == 1: +    idx += 1 +else: +    dp[1] = 1 +for i in range(2, n + 1): +    if i == a[idx]: +        dp[i] = 0 +        idx += 1 -        cnt2, cnt1 = cnt1, cnt2 + cnt1 -else: -    ans = (cnt2 + cnt1) % 1000000007 -print(ans) +        dp[i] = (dp[i - 1] + dp[i - 2]) % mod +print((dp[n]))