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]: idx += 1

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



print((dp[n]))
import sys

sys.setrecursionlimit(10**9)

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

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

mod = 10**9+7

memo = [-1]*(n+1)

def rec(x):

    if memo[x] != -1: pass

    elif x == 0: memo[x] = 1

    elif a and x == a[-1]:

        memo[x] = 0

        a.pop()

    elif x == 1: memo[x] = 1

    else: memo[x] = rec(x-1)+rec(x-2)

    return memo[x]%mod

print((rec(n)))
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]:
        idx += 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print((dp[n]))

import sys

sys.setrecursionlimit(10**9)
n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
mod = 10**9 + 7
memo = [-1] * (n + 1)


def rec(x):
    if memo[x] != -1:
        pass
    elif x == 0:
        memo[x] = 1
    elif a and x == a[-1]:
        memo[x] = 0
        a.pop()
    elif x == 1:
        memo[x] = 1
    else:
        memo[x] = rec(x - 1) + rec(x - 2)
    return memo[x] % mod


print((rec(n)))

+import sys + +sys.setrecursionlimit(10**9) -a.append(-1) -idx = 0 -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]: -        idx += 1 +memo = [-1] * (n + 1) + + +def rec(x): +    if memo[x] != -1: +        pass +    elif x == 0: +        memo[x] = 1 +    elif a and x == a[-1]: +        memo[x] = 0 +        a.pop() +    elif x == 1: +        memo[x] = 1 -        dp[i] = (dp[i - 1] + dp[i - 2]) % mod -print((dp[n])) +        memo[x] = rec(x - 1) + rec(x - 2) +    return memo[x] % mod + + +print((rec(n)))