MOD = 1_000_000_007

nn,mm = gets.chomp.split(' ').map(&:to_i)

a = []
0.step(mm-1) do |i|
  k = gets.chomp.to_i
  a[k] = 1
end

dp = []

dp[0] = 1
dp[1] = a[1] ? 0 : dp[0]

2.step(nn) do |i|
  dp[i] = a[i] ? 0 : (dp[i-1] + dp[i-2])%MOD
end

p dp[nn]
