[N,M] = list(map(int,input().split()))
a = [int(input()) for i in range(M)]
DP = [0]*(N+1)
DP[0] = 1
if 1 in a:
    DP[1] = 0
else:
    DP[1] = 1
for i in range(2,N+1):
    if i in a:
        DP[i] = 0
    else:
        DP[i] = DP[i-1] + DP[i-2]
print(DP[N]%(1000000007))