# 4, 0, 608200469

waru = 1_000_000_007 # あまりを出す
n, m = gets.split.map &:to_i # N段目まで行きたい
a = []
while aa = gets # 壊れてる階段
  a << aa.to_i
end
# p [n, m]
# p a

arr = Array.new(n, 0)
# arr[0] = 1
# arr[1] = 1
0.upto(n) do |i|
  if a.any?{|aa|aa == i}
    arr[i] = 0
    next
  end
  if i == 0 || i == 1
    arr[i] = 1
    next
  end
  arr[i] = arr[i-1] + arr[i-2]
end

# p arr
p (arr[-1] % waru)
