n, m = gets.chomp.split.map(&:to_i)
broken = {-1 => true}
m.times{broken[gets.to_i] = true}
arr = [1]
1.upto(n){|i|
    arr << 0
    next if broken[i]
    arr[i] = (arr[i] + arr[i - 2]) % 1_000_000_007
    arr[i] = (arr[i] + arr[i - 1]) % 1_000_000_007
}
puts arr.last