n, m = map(int, input().split())
a_s = [int(input()) for _ in range(m)]

dp = [1]

for i in range(1, n + 1):
    if i in a_s:
        dp.append(0)
    else:
        dpim2 = 0 if i-2 < 0 else dp[i-2]
        dp.append((dp[i-1] + dpim2) % 1000000007)

print(dp[-1])
