# input
N, M = map(int, input().split())
a = []
a_append = a.append

for n in range(M):
    a_append(int(input()))

mod = 1000000007

# check
dp = {0: 1, 1: 1}
for n in range(2, N + 1):
    dp[n] = 0
    if n - 1 not in a:
        dp[n] += dp[n - 1]
    if n - 2 not in a:
        dp[n] += dp[n - 2]

print(dp[N] % mod)