N, M = gets.split.map(&:to_i)
A = Hash.new {false}
M.times do
  A[gets.to_i] = true
end

MOD = 10 ** 9 + 7

dp = Array.new(N + 1) {0}
dp[0] = 1

for i in 0..N
  next_stair_1 = i + 1
  next if next_stair_1 > N

  if A[next_stair_1] == false
    dp[next_stair_1] += dp[i]
    dp[next_stair_1] %= MOD
  end

  next_stair_2 = i + 2
  next if next_stair_2 > N

  if A[next_stair_2] == false
    dp[next_stair_2] += dp[i]
    dp[next_stair_2] %= MOD
  end
end

puts dp[-1]
