n,m = map(int,input().split())
para = [int(input()) for i in range(m)]
mod = 10**9+7
dp = [0]*(n+1)
for i in range(n+1):
    if not i in para :
        if i == 1 or i==0:
            dp[i] = 1
        else:
            dp[i] = dp[i-1] + dp[i-2]
    else :
        dp[i] = 0


print("{}".format(dp[-1]%mod))