n,m = map(int,input().split())
a_ls = [int(input()) for _ in range(m)]

dp = [0] * (n+1)
dp[0] = 1
for i in range(n):
    if i+1 not in a_ls and i not in a_ls:
        if dp[i + 1] == 0:
            dp[i+1] = dp[i]
        else:
            dp[i+1] = (dp[i+1] + dp[i]) % 1000000007
    if i+2 <= n and i+2 not in a_ls and i not in a_ls:
        if dp[i + 2] == 0:
            dp[i+2] = dp[i]
        else:
            dp[i+2] = (dp[i+2] + dp[i]) % 1000000007
print(dp[-1])