#!/usr/bin/env ruby
# require 'pry'

# dpテンプレ
# 最小化
# dp = Hash.new{ Float::INFINITY }
# dp[i] = [dp[i], dp[i-1] + hoge].min
# dp[0] = 0
# 最大化
# dp = Hash.new{ 0 }
# dp[i] = [dp[i], dp[i-1] + hoge].max
# dp[0] = 0

dp = Hash.new{ 0 }
dp[0] = 0
ary=[]
n,m = gets.split(' ').map(&:to_i)
m.times do |num|
  ary<<gets.to_i
end

if ary.include?(1)
  dp[1] = 0
  if ary.include?(2)
    dp[2] = 0
  else
    dp[2] = 1
  end
else
  dp[1] = 1
  if ary.include?(2)
    dp[2] = 0
  else
    dp[2] = 2
  end
end

3.upto(n) do |i|
  if dp[i-1] == 0 && dp[i-2] == 0
    dp[n] = 0
    break
  end
  if ary.include?(i)
    dp[i] = 0
    next
  else
    dp[i] = [dp[i], (dp[i-1] + dp[i-2])].max
  end
end

# p dp
puts dp[n] % 1_000_000_007
