n, m = map(int, input().split())
a = []
for _ in range(m):
    a.append(int(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(n):
    if i+1 not in a:
        dp[i+1] += dp[i]
    if i<n-1 and i+2 not in a:
        dp[i+2] += dp[i]
print(dp[-1]%(10**9+7))
