N,M = map(int,input().split())
dp = [0]*(N+2)
a = [int(input()) for _ in  range(M)]

dp[1] = 1

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

print(dp[N+1] % (10**9+7))