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

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

dp = [1] + [0] * n
for i in range(1, n+1):
    if n in bads:
        continue
    if 1 < i:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[n-1]
    dp[i] %= 1000000007

print(dp[-1])
