import sys
 
sys.setrecursionlimit(1000000)
n, m, *a = map(int, open(0).read().split())
dp = [1] + [-1] * n
dp[1] = 1
for i in a:
    dp[i] = 0
 
def count(n):
    if dp[n] != -1:
        return dp[n]
    dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
    return dp[n]
 
 
print(count(n)) import sys sys sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 n, m, *a = map(int, open(0).read().split()) n map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split m *a a dp = [1] + [-1] * n dp [1] + [-1] * n [1] 1 [-1] * n [-1] -1 n dp[1] = 1 dp[1] dp 1 1 for i in a:
    dp[i] = 0
  i a dp[i] = 0 dp[i] dp i 0 def count(n):
    if dp[n] != -1:
        return dp[n]
    dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
    return dp[n]
 
  count if dp[n] != -1:
        return dp[n]
     dp[n] != -1 dp[n] dp n -1 return dp[n] dp[n] dp n dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7) dp[n] dp n (count(n - 1) + count(n - 2)) % (10**9 + 7) count(n - 1) + count(n - 2) count(n - 1) count n - 1 n 1 count(n - 2) count n - 2 n 2 10**9 + 7 10**9 10 9 7 return dp[n] dp[n] dp n n n print(count(n)) print count(n) count n n, m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) n dp = [1] + [-1] * n [1] + [-1] * n dp def count(n):
    if dp[n] != -1:
        return dp[n]
    dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
    return dp[n]
 
  def count(n):
    if dp[n] != -1:
        return dp[n]
    dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
    return dp[n]
 
  count m, *a = map(int, open(0).read().split()) map(int, open(0).read().split()) m
import sys
 
sys.setrecursionlimit(1000000)
n, m, *a = map(int, open(0).read().split())
dp = [1] + [-1] * n
dp[1] = 1
for i in a:
    dp[i] = 0
 
def count(n):
    if dp[n] != -1:
        return dp[n]
    dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
    return dp[n]
 
 
print(count(n))