from sys import stdin

MOD = 1000000007

n, m = map(int, raw_input().strip().split())
inp = stdin.readlines()
broken = [0] * n

for line in inp:
    a = int(line.strip())
    broken[a] = 1

dp = [0] * (n + 1)

dp[n] = 1
if not broken[n - 1]: dp[n - 1] = 1
for i in xrange(n - 2, -1, -1):
    if broken[i]: continue
    dp[i] = dp[i + 1] + dp[i + 2]
    if dp[i] >= MOD: dp[i] -= MOD

print dp[0] % MOD
