N, M = [int(c) for c in input().split()]
a = [int(input()) for _ in range(M)]

dp = [0, 1]

for i in range(N):
    if i+1 in a:
        dp.append(0)
    else:
        dp.append(dp[i]+dp[i+1])

print(dp[-1] % 1000000007)