N,M = map(int,input().split(' '))
l = [int(input()) for i in range(M)]

mod = 10**9+7
dp = {}
for i in range(N+1):
    dp[i] = 1
dp[1] = 0 if 1 in l else 1

for i in range(2,N+1):
    if i in l:
        dp[i] = 0
        continue
    else:
        dp[i] = dp[i-1] + dp[i-2]

print(dp[N]%mod)