let inp = readLine()!.split(separator: " ").map { Int($0)! }

let n = inp[0]
let m = inp[1]

let mod = 1000000007

var banned = Set<Int>()

for _ in 0..<m {
  let a = Int(readLine()!)!
  banned.insert(a)
}

var dp: [Int] = .init(repeating: 0, count: n + 1)

dp[0] = 1
for i in 1...n {
  if banned.contains(i) {
    continue
  }
  dp[i] = dp[i-1] + (i - 2 < 0 ? 0 : dp[i-2])
  dp[i] %= mod
}
print(dp[n] % mod)