n,m = (int(i) for i in input().split())
a = [int(input()) for i in range(m)]
oks = [True if not i in a else False for i in range(n+1)]
mod = 1000000007
dp = [0 for _ in range(n+1)]
dp[0] = 1
dp[1] = 1 if not 1 in a else 0
for i in range(2,n+1):
    if oks[i] is True:
        dp[i] = (dp[i-1]+dp[i-2])%mod
print(dp[n])
