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

a = []
for i in range(m):
    a.append(int(input()))

dp = []
for dpi in range(n):
    dp.append(0)

for j in range(n):
    if j == 0 and j+1 not in a:
        dp[j] = 1
    elif j == 1 and j+1 not in a:
        dp[j] = dp[j-1] + 1
    elif j > 1 and j+1 not in a:
        dp[j] = dp[j-1] + dp[j-2]

print(dp[n-1] % 1000000007)