N,M = map(int,input().split())
A = [int(input()) for _ in range(M)]
MOD = 10**9+7
table = [0]*(N+1)
table[0] = 1

for i in range(N+1):
    if i+1<=N and (i+1) not in A:
        table[i+1] += table[i]
    if i+2<=N and (i+2) not in A:
        table[i+2] += table[i]

print(table[N]%MOD)