mod = 1000000007
n, m = map(int, input().split())
dat_m = []
dp = [0] * (n + 1)
for i in range(m):
    dat_m.append(int(input()))
dp[0] = 1
for i in range(1, n + 1):
    #print(dp)
    dp[i] = dp[i - 1]

    if i > 1:
        dp[i] += dp[i - 2]

    if i in dat_m:
        dp[i] = 0

    dp[i] = dp[i] % mod

#import pprint
print(dp[n])
#pprint.pprint(dp)