@s=Array.new(100010)
@a=Array.new(100010,0)

n,m=gets.split.map(&:to_i)
for i in 1..m do
    p = gets.to_i
    @a[p] = 1
end

def rec(x)
    sum = 0;
    if x == 0
        return 1;
    end
    if x < 0 
        return 0;
    end
    if @a[x] == 1
        return 0
    end
    if @s[x] != nil
        return @s[x]
    end

    sum = rec(x - 1) + rec(x - 2)
    @s[x] = sum
    return sum 
end

p rec(n) % 1000000007
