N, M = list(map(int,input().split()))
a = [int(input()) for i in range(M)]

b = [0]*(N+1)
b[0] = 1

if 1 not in a:
    b[1] = 1

for i in range(2,N+1):
    if i not in a:
        for j in range(1,3):
            if b[i-j] != 0:
                b[i]+= b[i-j]

print(b[N]%1000000007)