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

for i in range(N+1):
    if i in broken:
        continue
    elif i==0 or i==1:
        l[i] = 1
    else:
        l[i] = l[i-1] + l[i-2]
    l[i] %= MOD

print(l[N])