mod = 1000000007
import collections
n, m = map(int, input().split())
dat_m = []
dp = collections.deque([])
for i in range(m):
    dat_m.append(int(input()))
dp.append(1)
for i in range(1, n + 1):
    t = 0
    t = dp[i - 1]
    if i > 1:
        t += dp[i - 2]
    if i in dat_m:
        t = 0
    t = t % mod
    dp.append(t)

print(dp[n])