n, m = gets.chomp.split(' ').map(&:to_i)
as = m.times.map { gets.chomp.to_i }

@ngs = {}
as.each { |pos| @ngs[pos] = 'x' }
@cnts = {}

def cnt(pos, max_pos)
    return 1 if pos == 0 || pos == 1

    return @cnts[pos] unless @cnts[pos].nil?

    up1 = @ngs[pos - 1].nil? ? cnt(pos - 1, max_pos) : 0
    up2 = @ngs[pos - 2].nil? ? cnt(pos - 2, max_pos) : 0
    @cnts[pos] = up1 + up2

    return @cnts[pos]
end

puts cnt(n, n) % 1000000007
