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

def count(n)
  cnts = []
  i = -1
  while i < n; i += 1;
    if $ng_list[i]
      cnts[i] = 0
      next
    elsif i == 0
      cnts[i] = 1
      next
    elsif i == 1
      cnts[i] = 1
      next
    else
      res = cnts[i - 1] + cnts[i - 2]
      cnts[i] = res
      next
    end
  end

  cnts.last
end

p count(N) % 1000000007