inputs = Array.new
while line = $stdin.gets
  inputs << line.chomp
end

N, M= inputs[0].split(" ").map(&:to_i)
$ng_list = Hash.new
inputs[1..-1].map do |s|
  ng = s.split(" ").map(&:to_i)[0]
  $ng_list[ng] = true
end

$memo = Hash.new
def count(n)
  if $ng_list[n]
    return 0
  end

  if $memo[n]
    return $memo[n]
  end
  res =
    if n == 0
      1
    elsif n == 1
      1
    else
      count(n - 2) + count(n - 1)
    end
  $memo[n] = res
  res
end

puts count(N) % 1000000007