n, m = list(map(int, input().split(' ')))
aaa = []
for i in range(m):
    aaa.append(int(input()))

dp = [1] * (n + 3)
for i in range(1, n+1):
    dp[i]  = dp[i-1] if i not in aaa else 0
    dp[i] += dp[i-2] if i >= 2 and i not in aaa else 0
    dp[i] = dp[i] % int(1e9 + 7)
print(dp[n])