N, M = [int(i) for i in input().split()]

dp = [-1] * 10100
dp[0] = 1
dp[1] = 1

for i in range(M):
    a = int(input())
    dp[a] = 0

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

print(dp[N] % 1000000007)