p = 10**9 + 7
n,m = list(map(int, input().split()))
a = set()
a = [a.add(int(input())) for _ in range(m)]

dp = [0 for i in range(n+2)]
dp[0] = 1

for i in range(n):
    if i+2 not in a:
        dp[i+2] += dp[i]%p
    if i+1 not in a:
        dp[i+1] += dp[i]%p

print(dp[-2]%p)