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

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