n, m = list(map(int, input().split()))
a = []

for i in range(m):
    a.append(int(input().strip()))

broken = [False] * (n + 1)

for i in range(m):
    broken[a[i]] = True

dp = []
dp.append(1)

if (broken[1]):
    dp.append(0)
else:
    dp.append(1)

for i in range(2, n + 1, 1):
    if (broken[i]):
        dp.append(0)
    else:
        dp.append((dp[i - 1] + dp[i - 2]) % 1_000_000_007)

print(dp[n])
