n,m = map(int,input().split())
stair = []
mod = int(1e9+7)
ans = 1
for i in range(m):
    stair.append(int(input()))
dp = [0] * (n+1)
dp[0] = dp[1] = 1
if 1 in stair:
    dp[1] = 0
if n == 1:
    print(1)
    exit()
for i in range(2, n+1):
    if i in stair:
        dp[i] = 0
    else:
        dp[i] = (dp[i-1] + dp[i-2])%mod
print(dp[-1])



