Mod = 10**9+7
N,M = map(int, input().split())
a = [int(input()) for _ in range(M)]
b = [1]+[0]*N
for i in range(1,N+1):
    if i in a:
        continue
    if i == 1:
        b[1] += b[0]
        continue
    b[i] += b[i-1]+b[i-2]
print(b[N]%Mod)