import sys
N, M = map(int, input().split())
ok = [True] * (N + 1)
for _ in range(M):
    a = int(sys.stdin.readline())
    ok[a] = False

dp = [0] * (N + 1)
if ok[1]:
    dp[1] = 1
if ok[2]:
    dp[2] = 2
for s in range(3, N + 1):
    if ok[s]:
        dp[s] = dp[s-1] + dp[s-2]
        dp[s] %= 1000000007
    else:
        dp[s] = 0

print(dp[N])