MOD = 1_000_000_007

lines = readlines.map(&:chop)

N, M = lines.shift.split.map(&:to_i)
brokens = lines.map(&:to_i)
brokens << -1

dp = [0] * (N + 2)
dp[1] = 1

2.upto(N + 1) do |i|
  if i == brokens[0] + 1
    brokens.shift while brokens[0] == i
    next
  end
  dp[i] = (dp[i - 2] + dp[i - 1]) % MOD
end

puts dp[-1]
