require 'pp'
$DEBUG ? define_method(:dpp){|e|pp e} : define_method(:dpp){|e|}

# 入力値を数値で返却する
def gets_i()
  gets.chomp.to_i
end

# 空白区切の入力値を数値の配列で返却する
def gets_i_list()
  gets.chomp.split(" ").map(&:to_i)
end

N, M = gets_i_list
a_list = []
M.times do
  a_list.push gets_i
end

dp = [0, 0, 0]
dp[0] = 1
dp[1] = 1 unless a_list.include?(1)
dp[2] = dp[0] + dp[1] unless a_list.include?(2)
dpp dp
3.upto(N) do |i|
  dp0, dp1, dp2 = dp
  if a_list.include?(i)
    dp[2] = 0
  else
    dp[2] = dp2 + dp1
  end
  dp[1] = dp2
  dp[0] = dp1
  dpp dp
end

dpp dp
puts dp.last % (10**9 + 7)