require 'set'

MOD = 1000000007

A = Set.new

# s = input()
# n = int(input())
# A = list(map(int, input().split()))
n, m = gets.split.map(&:to_i)

m.times {
  a = gets.to_i
  A.add(a)
}

res = [0]*(n+1)

res[0] = 1
if !A.include?(1)
  res[1] = 1
end

(2..n).each do |i|
  next if A.include?(i)
  res[i] = (res[i-1] + res[i-2])%MOD
end

p(res[n])
