n,m=map(int,input().split())
MOD = 1000000007 
D=[0] * n
D[0], D[1] = 1, 1
for _ in range(m):
    D[int(input())] = -1
for i in range(2, n):
    if D[i] == -1:
        continue
    if D[i-1] != -1:
        D[i] += D[i-1]
    if D[i-2] != -1:
        D[i] += D[i-2]
    D[i]%=MOD
ans = 0
if D[n-1] != -1:
    ans += D[n-1]
if D[n-2] != -1:
    ans += D[n-2]
print(ans % MOD)