N,M = map(int,input().split())
bro = [int(input()) for i in range(M)]
mod = 10**9 + 7
dp = [0]*(N+1)
if N == 1:
    print(1)
    exit()
dp[0:2] = 1,1
for i in range(2,N+1):
    if i in bro:
        continue
    else:
        dp[i]= dp[i-1] + dp[i-2]
print(dp[-1] % mod)