N, M = map(int, input().split())

mod = 10**9 + 7

li = [0]*(N+1)
li[0] = 1
li[1] = 1
for i in range(M):
    a = int(input())
    li[a] = -1

for i in range(2, N+1):
    if li[i] == 0:
        li[i] = (li[i-1] + li[i-2]) % mod
    else:
        li[i] = 0

print(li[-1])
