N, M = map(int, input().split())
A = list(map(int, [input() for _ in range(M)]))

step = [1 for _ in range(N + 1)]
step[0] = 1
step[1] = 1

for i in A:
    dp[i] = 0

for i in range(2, N + 1):
    if step[i] == 1:
        step[i] = step[i-1] + step[i-2]

print (step[-1] % 1000000007)
