CodeEff/ECCO huggingface dataset:
# Original solution
mod = 10**9+7
n, m = list(map(int, input().split()))
l = [0]*n
for _ in range(m):
  l[int(eval(input()))-1] = 1

s = 0
t = 1

for i in range(n):
  if l[i] > 0:
    t, s = 0, t
  else:
    t, s = (s+t)%mod, t

print(t)

# Optimized solution
import sys
input = sys.stdin.readline

mod = 10**9+7
n, m = list(map(int, input().split()))
l = [0]*n
for _ in range(m):
  l[int(eval(input()))-1] = 1

t, s = 1, 0

for i in range(n):
  if l[i]:
    t, s = 0, t
  else:
    t, s = (s+t)%mod, t

print(t)
# Original solution
M=10**9+7
n,m=list(map(int,input().split()))
l=[int(eval(input()))-1 for _ in range(m)]
s,t=0,1
for i in range(n):
  if i in l: s,t=t,0
  else: s,t=t,(s+t)%M
print(t)

# Optimized solution
M=10**9+7
f=input
n,m=list(map(int,f().split()))
s,t=0,1
u=0 if m<1 else int(f())
for i in range(n):
  if i==u-1:
    s,t=t,0
    try: u=int(f())
    except: pass
  else: s,t=t,(s+t)%M
print(t)
# Original solution
M=10**9+7
f=input
n,m=list(map(int,f().split()))
s,t=0,1
u=0 if m<1 else int(f())
for i in range(n):
  if i==u-1:
    s,t=t,0
    try: u=int(f())
    except: pass
  else: s,t=t,(s+t)%M
print(t)

# Optimized solution
M=10**9+7
import sys
f=sys.stdin.readline
n,m=list(map(int,f().split()))
s,t=0,1
u=0 if m<1 else int(f())
for i in range(n):
  if i==u-1:
    s,t=t,0
    try: u=int(f())
    except: pass
  else: s,t=t,(s+t)%M
print(t)
# Original solution
import math

def comb(a, b):
    return math.factorial(a) // (math.factorial(b) * math.factorial(a - b))

n, m = list(map(int, input().split()))
ans = 1
p = 0
for _ in range(m):
    a = int(eval(input()))
    cnt = 0
    if a == p:
        print((0))
        exit()
    s = a - 1 - p
    for i in range(s // 2 + 1):
        cnt += comb(s - i, i)
    p = a + 1
    ans = (ans * cnt) % (10 ** 9 + 7)
s = n - p
cnt = 0
for i in range(s // 2 + 1):
    cnt += comb(s - i, i)
ans = (ans * cnt) % (10 ** 9 + 7)
print(ans)


# Optimized solution
n, m = list(map(int, input().split()))
dp = [0] * (n + 1)
safe = [True] * (n + 1)
mod = 10 ** 9 + 7
for _ in range(m):
    a = int(eval(input()))
    safe[a] = False
dp[0] = 1
if safe[1] is True:
    dp[1] = 1 
for i in range(2, n+1):
    if safe[i-1] is True:
        dp[i] += dp[i-1]
    if safe[i-2] is True:
        dp[i] += dp[i-2]
    dp[i] %= mod
print((dp[n]))
# Original solution
import sys
input = sys.stdin.readline
n,m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]
dp = [1]*2 + [0 for _ in range(n-1)]
MOD = 10**9+7
   
for i in range(n-1):
  if i+1 in a:
    dp[i+1] = 0
  dp[i+2] = dp[i]+dp[i+1]
  dp[i+2] %= MOD

print((dp[-1]))  


# Optimized solution
import sys
input = sys.stdin.readline
n,m = list(map(int,input().split()))
hole = [0]*(n+1)
for i in range(m):
  hole[int(eval(input()))] = 1

dp = [0]*(n+1)
dp[0] = 1
MOD = 10**9+7
   
for i in range(1,n+1):
  if hole[i]==1:
    dp[i] = 0
  else:
    dp[i] = dp[i-1]+dp[i-2]
    dp[i] %= MOD

print((dp[-1]))
# Original solution
N,M = list(map(int, input().split()))

if N==1:
  print((1))
  exit()

A = []
a_prev = None
for i in range(M):
  a_i = int(eval(input()))
  if a_prev == a_i:
    print((0))
    exit()
  A.append(a_i)
  a_prev = a_i

N_2 = 1
N_1 = 1  
ans = 0
for i in range(1, N):
  if i in A:
    N_1 = 0
  ans = (N_1 + N_2)%1000000007
  N_2 = N_1
  N_1 = ans
print(ans)


# Optimized solution
N,M = list(map(int, input().split()))

if N==1:
  print((1))
  exit()

A = [0]*N
a_prev = None
for i in range(M):
  a_i = int(eval(input()))
  if a_prev == a_i:
    print((0))
    exit()
  A[a_i] = 1  
  a_prev = a_i

N_2 = 1
N_1 = 1  
ans = 0
for i in range(1, N):
  if A[i]==1:
    N_1 = 0
  ans = (N_1 + N_2)%1000000007
  N_2 = N_1
  N_1 = ans
print(ans)
# Original solution
#!/usr/bin/env python3

P_NUM = 1000000007


def solv(n, m, a):
    comb = [1] * (n+1)
    for i in a:
        comb[i] = 0

    for i in range(2, n+1):
        if comb[i] != 0:
            comb[i] = comb[i-1] + comb[i-2]

    return comb[-1]


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    a = [int(eval(input())) for _ in range(m)]

    ans = solv(n, m, a)

    print((ans % P_NUM))


# Optimized solution
#!/usr/bin/env python3

P_NUM = 1000000007


def solv(n, m, a):
    comb = [1] * (n+1)
    for i in a:
        comb[i] = 0

    for i in range(2, n+1):
        if comb[i] != 0:
            comb[i] = (comb[i-1] + comb[i-2]) % P_NUM

    return comb[-1]


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    a = [int(eval(input())) for _ in range(m)]

    ans = solv(n, m, a)

    print(ans)
# Original solution
#!/usr/bin/env python3

import array


P_NUM = 1000000007


def solv(n, m, a):
    comb = array.array('I', [1] * (n+1))
    for i in a:
        comb[i] = 0

    for i in range(2, n+1):
        comb[i] *= (comb[i-1] + comb[i-2]) % P_NUM

    return comb[-1]


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    a = [int(eval(input())) for _ in range(m)]

    ans = solv(n, m, a)

    print(ans)


# Optimized solution
#!/usr/bin/env python3

import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb =  [1] * (n+1)
    for i in a:
        comb[i] = 0

    for i in range(2, n+1):
        comb[i] *= (comb[i-1] + comb[i-2]) % P_NUM

    return comb[-1]


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    if m:
        a = list(map(int, sys.stdin))
    else:
        a = []

    ans = solv(n, m, a)

    print(ans)
# Original solution
#!/usr/bin/env python3

import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb =  [1] * (n+1)
    for i in a:
        comb[i] = 0

    for i in range(2, n+1):
        comb[i] *= (comb[i-1] + comb[i-2]) % P_NUM

    return comb[-1]


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    if m:
        a = list(map(int, sys.stdin))
    else:
        a = []

    ans = solv(n, m, a)

    print(ans)

# Optimized solution
#!/usr/bin/env python3

import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb_m2 = 1
    if 1 in a:
        comb_m1 = 0
    else:
        comb_m1 = 1

    comb = 1
    for i in range(2, n+1):
        if i in a:
            comb = 0
        else:
            comb = (comb_m1 + comb_m2) % P_NUM

        comb_m1, comb_m2 = comb, comb_m1

    return comb


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    if m:
        a = set(map(int, sys.stdin))
    else:
        a = set()

    ans = solv(n, m, a)

    print(ans)
# Original solution
#!/usr/bin/env python3

import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb_m2 = 1
    if 1 in a:
        comb_m1 = 0
    else:
        comb_m1 = 1

    comb = 1
    for i in range(2, n+1):
        if i in a:
            comb = 0
            a.remove(i)
        else:
            comb = (comb_m1 + comb_m2) % P_NUM

        comb_m1, comb_m2 = comb, comb_m1

    return comb


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    if m:
        a = set(map(int, sys.stdin))
    else:
        a = set()

    ans = solv(n, m, a)

    print(ans)


# Optimized solution
#!/usr/bin/env python3

import sys

P_NUM = 1000000007


def solv(n, m, a):
    comb_m2 = 1
    if 1 in a:
        comb_m1 = 0
    else:
        comb_m1 = 1

    for i in range(2, n+1):
        if i in a:
            comb_m1, comb_m2 = 0, comb_m1
        else:
            comb_m1, comb_m2 = (comb_m1 + comb_m2) % P_NUM, comb_m1

    return comb_m1


if __name__ == '__main__':

    n, m = list(map(int, input().split()))
    if m:
        a = set(map(int, sys.stdin))
    else:
        a = set()

    ans = solv(n, m, a)

    print(ans)
# Original solution
N,M=list(map(int,input().split()))
A=[]
B=[True]*(N+1)
DP=[0]*(N+1)
DP[0]=1
for i in range(M):
  A.append(int(eval(input())))
for i in range(M):
  B[A[i]]=False
#print(B)

for i in range(1,N+1):
  if B[i]==False:
    DP[i]=0
  else:
    if i==1:
      DP[i]=DP[i-1]
    else:
      DP[i]=DP[i-1]+DP[i-2]
if DP[N]==0:
  print((0))
else:
  print((DP[N]%1000000007))

# Optimized solution
N,M=list(map(int,input().split()))
A=[]
B=[True]*(N+1)
DP=[0]*(N+1)
DP[0]=1
for i in range(M):
  A.append(int(eval(input())))
for i in range(M):
  B[A[i]]=False
#print(B)

for i in range(1,N+1):
  if B[i]==False:
    DP[i]=0
  else:
    if i==1:
      DP[i]=DP[i-1]
    else:
      DP[i]=(DP[i-1]+DP[i-2])%1000000007
if DP[N]==0:
  print((0))
else:
  print((DP[N]))
# Original solution
N, M = list(map(int, input().split()))
a = []
flag = True
for i in range(M):
    a.append(int(eval(input())))

a = [-1] + a + [N+1] #add beginning and end

# list of steps between broken steps
s1=[]
for i in range(len(a)-1):
    if a[i+1]-a[i]-2<0:
        flag = False
        break
    s1.append(a[i+1]-a[i]-2) 

if flag==False:
    print((0))    
else:     
    # possibile ways for steps
    s2 = [1, 1, 2]
    while len(s2) < N+1:
        s2.append(s2[-2]+s2[-1])
    
    # possible ways for all
    s3 = 1 
    for j in s1:
        s3 = s3 * s2[j] 
        
    s4 = s3 % 1000000007 
    print(s4)

# Optimized solution
N, M = list(map(int, input().split()))
a = []
flag = True
for i in range(M):
    a.append(int(eval(input())))

a = [-1] + a + [N+1] #add beginning and end

# list of steps between broken steps
s1=[]
for i in range(len(a)-1):
    if a[i+1]-a[i]-2<0:
        flag = False
        break
    s1.append(a[i+1]-a[i]-2) 

if flag==False:
    print((0))    
else:     
    # possibile ways for steps
    s2 = [1, 1, 2]
    while len(s2) < max(s1)+1:
        s2.append(s2[-2]+s2[-1])
    
    # possible ways for all
    s3 = 1 
    for j in s1:
        s3 = s3 * s2[j] 
        
    s4 = s3 % 1000000007 
    print(s4)
# Original solution
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, M = list(map(int, input().split()))
    A = [int(eval(input())) for _ in range(M)]

    mod = 10**9 + 7
    dp = [0] * (N + 1)
    dp[0] = 1

    for i in range(1, N + 1):
        if i in A:
            continue

        if i == 1:
            dp[1] = dp[0]
            continue

        dp[i] = dp[i - 1] + dp[i - 2]
        dp[i] %= mod

    print((dp[N]))


if __name__ == "__main__":
    main()


# Optimized solution
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    N, M = list(map(int, input().split()))
    A = set([int(eval(input())) for _ in range(M)])

    mod = 10**9 + 7
    dp = [0] * (N + 1)
    dp[0] = 1

    for i in range(1, N + 1):
        if i in A:
            continue

        if i == 1:
            dp[1] = dp[0]
            continue

        dp[i] = dp[i - 1] + dp[i - 2]
        dp[i] %= mod

    print((dp[N]))


if __name__ == "__main__":
    main()
# Original solution
n,m=list(map(int,input().split()))
a=[]
for i in range(m):
  a.append(int(eval(input())))

dp = [0]*(n+1)
dp[0] = 1
if 1 not in a:
  dp[1] = 1

for i in range(2,n+1):
  if i in a:
    continue

  dp[i] += dp[i-1] + dp[i-2]
  dp[i] = dp[i] % 1000000007
print((dp[n]))

# Optimized solution
n,m=list(map(int,input().split()))
a=set()
for i in range(m):
  a.add(int(eval(input())))

dp = [0]*(n+1)
dp[0] = 1
if 1 not in a:
  dp[1] = 1

for i in range(2,n+1):
  if i in a:
    continue

  dp[i] += dp[i-1] + dp[i-2]
  dp[i] = dp[i] % 1000000007
print((dp[n]))
# Original solution
n,m = list(map(int,input().split()))
oks = [True]*(n+1)
for i in range(m):
    a = int(eval(input()))
    oks[a] = False
dp = [0]*(n+1)
dp[0] = 1
for i in range(n+1):
    for j in range(i+1,min(n+1,i+3)):
        if oks[j]:
            dp[j] += dp[i]
            dp[j] %= 1000000007
print((dp[n]))


# Optimized solution
n,m = list(map(int,input().split()))
a = set([int(eval(input())) for i in range(m)])
mod = 10**9+7

dp = [0]*(n+1)
dp[0] = 1
for i in range(n):
    if i+1<n+1 and not i+1 in a:
        dp[i+1] += dp[i]
        dp[i+1] %= mod
    if i+2<n+1 and not i+2 in a:
        dp[i+2] += dp[i]
        dp[i+2] %= mod

print((dp[n]))
# Original solution
import sys
sys.setrecursionlimit(10**5+10)
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
MOD = 1000000007
memo = {}
def Fib(n, A, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, A, MOD) + Fib(n-2, A, MOD) ) % MOD
        return memo[n]
print((Fib(N, A, MOD)))

# Optimized solution
import sys
sys.setrecursionlimit(10**5+10)
N, M = list(map(int, input().split()))
A = set([int(eval(input())) for _ in range(M)])
MOD = 1000000007
memo = {}
def Fib(n, MOD):
    if n in A:
        return 0
    elif n == 0:
        return 1
    elif n == 1:
        return 1
    elif n in memo:
        return memo[n]
    else:
        memo[n] = ( Fib(n-1, MOD) + Fib(n-2, MOD) ) % MOD
        return memo[n]
print((Fib(N, MOD)))
# Original solution
N,M = list(map(int, input().split()))
A = [int(eval(input())) for i in range(M)]

dp = [0]*(N+1)
dp[0] = 1

for next in range(1,N+1):
    if next in A:
        dp[next] = 0
    else:
        dp[next] = (dp[next-1] + dp[next-2])%1000000007

print((dp[N]))

# Optimized solution
N,M = list(map(int, input().split()))
A = set([int(eval(input())) for i in range(M)])

dp = [0]*(N+1)
dp[0] = 1

for next in range(1,N+1):
    if next in A:
        dp[next] = 0
    else:
        dp[next] = (dp[next-1] + dp[next-2])%1000000007

print((dp[N]))
# Original solution
MOD = 10**9 + 7

n,m = list(map(int,input().split()))

ban = [False] * (n + 1)

for i in range(m):
    a = int(eval(input()))
    ban[a] = True

dp = [0] * (n + 1)
dp[0] = 1

for i in range(n):
    dp[i] %= MOD
    if ban[i]:dp[i] = 0
    #print(i, dp[i])
    if i + 1 <= n:
        dp[i + 1] += dp[i]
    if i + 2 <= n:
        dp[i + 2] += dp[i]

print((dp[n] % MOD))


# Optimized solution
n,m = list(map(int,input().split()))
dp = [0] * (n+1) + [0] * 10

mod = 10**9 + 7
for i in range(m):
    dp[int(eval(input()))] = -1 # 壊れているので、-1としておこう?

dp[0] = 0 # 0段目にいるとしよう
# 1段目が行けなかったら...?
dp[1] = 1 if dp[1] != -1 else -1 # 1段目にいく方法は1通り?
dp[2] = -1 if dp[2] == -1 else (1 if dp[2] != -1 and dp[1] == -1 else 2) # 2段目に行く方法は2通り?
for i in range(3,n+1):
    if dp[i] != -1 and dp[i-1] != -1:
        dp[i] += dp[i-1]
        dp[i] %= mod
    if i > 1:
        if dp[i] != -1 and dp[i-2] != -1:
            dp[i] += dp[i-2]
            dp[i] %= mod
#print(dp)
print((dp[n]%mod))
# Original solution
import sys
sys.setrecursionlimit(100000000)

def dfs(x):
  if x == N:
    return 1
  if x > N or x in a:
    return 0
  if memo[x]:
    return memo[x]
  memo[x] = dfs(x+1) + dfs(x+2)
  return memo[x]

N, M = [int(x) for x in input().split()]
a = [int(eval(input())) for i in range(M)]
#print(N)
#print(M)
#print(a)
memo = [False]*(N+1)
count = dfs(0)
print((count%1000000007)) 



# Optimized solution
import sys
sys.setrecursionlimit(100000000)

def dfs(x):
  if x == N:
    return 1
  if x > N:
    return 0
  if memo[x] >= 0:
    return memo[x]
  memo[x] = dfs(x+1) + dfs(x+2)
  return memo[x]

N, M = [int(x) for x in input().split()]
a = [int(eval(input())) for i in range(M)]
#print(N)
#print(M)
#print(a)
memo = [-1]*(N+1)
for ai in a:
  memo[ai] = 0
count = dfs(0)
print((count%1000000007))
# Original solution
import sys
input=sys.stdin.readline
from collections import deque
from heapq import heappush,heappop
import re

def int_raw():
    return int(eval(input()))
 
def ss_raw():
    return input().split()
 
def ints_raw():
    return tuple(map(int, ss_raw()))


DIV=10**9+7

def mod_invs(n,mod=DIV):
    inv=[0]*(n+1)
    inv[0]=1
    inv[1]=1
    for i in range(2,n+1):
        inv[i] = (-(mod//i)*inv[mod%i]) % mod
    return inv



def main():
    N,M = ints_raw()
    As = [int_raw() for _ in range(M)]
    is_breake = [0]*(N+1)
    for a in As:
        is_breake[a]=1
    memo = [0]*(N+1)

    memo[0]=1
    memo[1]=1 if is_breake[1]==0 else 0
    for n in range(2,N+1):
        if is_breake[n]:
            continue
        else:
            memo[n]=(memo[n-2]+memo[n-1])%DIV
    return memo[-1]

print((main()))


# Optimized solution
import sys
input=sys.stdin.readline
from collections import deque
from heapq import heappush,heappop
import re

def int_raw():
    return int(eval(input()))
 
def ss_raw():
    return input().split()
 
def ints_raw():
    return tuple(map(int, ss_raw()))


DIV = 10**9+7


def main():
    N,M = ints_raw()
    As = [int_raw() for _ in range(M)]
    is_breake = [0]*(N+1)
    for a in As:
        is_breake[a]=1
    memo = [0]*(N+1)
    memo[0]=1
    memo[1]=1 if is_breake[1]==0 else 0
    for n in range(2,N+1):
        if is_breake[n]:
            memo[n] =0
            
        else:
            memo[n]=(memo[n-2]+memo[n-1])%DIV
    return memo[-1]

print((main()))
# Original solution
#入力取得
from fractions import Fraction
import sys
sys.setrecursionlimit(15000)

def fibMul(fn1, fn2):
  a = fn1[0]
  b = fn1[1]
  c = fn2[0]
  d = fn2[1]
  return (a*c + 5*b*d, a*d + b*c)

def fibExp(fn, n):
  if (n == 0):
    return (Fraction(1), Fraction(1));
  if (n % 2 == 0):
    return fibExp(fibMul(fn, fn), n / 2);
  return fibMul(fn, fibExp(fn, n - 1));

def fibMin(fn1, fn2):
  a = fn1[0]
  b = fn1[1]
  c = fn2[0]
  d = fn2[1]
  return (a - c, b - d)

def fibMain(n):
  fibNum1 = (Fraction(1, 2), Fraction( 1, 2))
  fibNum2 = (Fraction(1, 2), Fraction(-1, 2))

  fibNum3 = fibMin(fibExp(fibNum1, n), fibExp(fibNum2, n))
  fibNum4 = (Fraction(0, 1), Fraction(1, 5))
  return fibMul(fibNum3, fibNum4)

def fib(n):
  return fibMain(n)[0].numerator





N, M = list(map(int, input().split()))

a= []

for i in range(M):
    a.append(int(eval(input())))

l = ["1"] * (N + 1)

for a_ele in a:
    l[a_ele] = "0"

l = ''.join(l)

# print(l)

if '00' in l:
    print((0))

else:
    l_arr = l.split('0')
    result = 1
    for l_ele in l_arr:
        result *= fib(len(l_ele))
        result = result % 1000000007

    print(result)


# Optimized solution
def fib(n):
    if n <= 1:
        return n
    result = [1, 0, 0, 1]
    matrix = [1, 1, 1, 0]
    while n > 0:
        if n % 2:
            result = mul(matrix, result)
        matrix = mul(matrix, matrix)
        n //= 2
    return result[2]

def mul(a, b):
    return [a[0]*b[0] + a[1]*b[2],
            a[0]*b[1] + a[1]*b[3],
            a[2]*b[0] + a[3]*b[2],
            a[2]*b[1] + a[3]*b[3]]





N, M = list(map(int, input().split()))

a= []

for i in range(M):
    a.append(int(eval(input())))

l = ["1"] * (N + 1)

for a_ele in a:
    l[a_ele] = "0"

l = ''.join(l)

# print(l)

if '00' in l:
    print((0))

else:
    l_arr = l.split('0')
    result = 1
    for l_ele in l_arr:
        result *= fib(len(l_ele))

        if result > 1000000007:
            result = result % 1000000007

    result = result % 1000000007

    print(result)
# Original solution
# ここから
import sys
input = sys.stdin.readline

def resolve():
    n, m = list(map(int, input().split()))
    aa = [int(eval(input())) for _ in range(m)]
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 0 if 1 in aa else 1

    for i in range(2, n+1):
        if i in aa:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % 1000000007

    print((dp[n]))



resolve()

# Optimized solution
# ここから
import sys
input = sys.stdin.readline

def resolve():
    n, m = list(map(int, input().split()))
    aa = [False] * (n+1)

    for i in range(m):
        a = int(eval(input()))
        aa[a] = True

    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 0 if aa[1] else 1

    for i in range(2, n+1):
        if aa[i]:
            dp[i] = 0
        else:
            dp[i] = (dp[i-2] + dp[i-1]) % 1000000007

    print((dp[n]))



resolve()
# Original solution
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: list(map(int, INPUT().split()))
S_MAP = lambda: list(map(str, INPUT().split()))
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N, M = MAP()
    A = [INT() for i in range(M)]

    dp = [1] * (N + 1)
    for a in A:
        dp[a] = 0

    for i in range(N-1):
        if not i+2 in A:
            dp[i+2] = (dp[i] + dp[i+1]) % mod
        else:
            dp[i+2] = 0
     
    print((dp[N]))



if __name__ == '__main__':
    main()

# Optimized solution
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
# from fractions import gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: list(map(int, INPUT().split()))
S_MAP = lambda: list(map(str, INPUT().split()))
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N, M = MAP()
    A = [INT() for i in range(M)]

    dp = [1] * (N + 1)
    for a in A:
        dp[a] = 0

    for i in range(N-1):
        dp[i+2] = dp[i+2] * (dp[i] + dp[i+1]) % mod
     
    print((dp[N]))


if __name__ == '__main__':
    main()
# Original solution
n, m = list(map(int, input().split() ))
broken = [int(eval(input())) for _ in range(m)]

mod = 10**9+7

num_way = [0] * (n+1)
num_way[0] = 1
if 1 in broken:
	num_way[1] = 0
else:
	num_way[1] = 1

for i in range(2, (n+1)):
	if i in broken:
		num_way[i] = 0
	else:
		num_way[i] = (num_way[i-1] + num_way[i-2]) % mod

print((num_way[n]))

# Optimized solution
n, m = list(map(int, input().split() ))
broken = [int(eval(input())) for _ in range(m)]
broken.append(-1) #番兵
broken_idx = 0

mod = 10**9+7

num_way = [0] * (n+1)
num_way[0] = 1
if broken[broken_idx] == 1:
	num_way[1] = 0
	broken_idx += 1
else:
	num_way[1] = 1

for i in range(2, (n+1)):
	if broken[broken_idx] == i:
		num_way[i] = 0
		broken_idx += 1
	else:
		num_way[i] = (num_way[i-1] + num_way[i-2]) % mod

print((num_way[n]))
# Original solution
mod = 10**9+7
n,m = list(map(int,input().split()))
a = [0]*m
for i in range(m):
    a[i] = int(eval(input()))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print((dp[n]))

# Optimized solution
mod = 10**9+7
n,m = list(map(int,input().split()))
a = set()
for i in range(m):
    a.add(int(eval(input())))
dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1) :
    dp[i] = (dp[i-1] + dp[i-2]) % mod
    if i in a :
        dp[i] = 0
print((dp[n]))
# Original solution
N,M = list(map(int,input().split()))
a = [int(eval(input())) for _ in range(M)]
k = 10**9+7
dp = [0]*(N+1)
dp[0] = 1
d = 1
if N == 1:
  print((1))
else:
  for i in range(1,N+1):
    if i in a:
      continue
    elif i==1:
      dp[i] = d
    elif i==2:
      d += dp[1]
      dp[i] = d
    else:
      d = d-dp[i-3]+dp[i-1]
      dp[i] = dp[i-1]+dp[i-2]
  print((dp[N]%k))

# Optimized solution
N,M = list(map(int,input().split()))
a = set([int(eval(input())) for _ in range(M)])
k = 10**9+7
dp = [0]*(N+1)
dp[0] = 1
if N == 1:
  print((1))
else:
  for i in range(1,N+1):
    if i in a:
      continue
    elif i==1:
      dp[1] = 1
    elif i==2:
      dp[i] = 1+dp[1]
    else:
      dp[i] = dp[i-1]+dp[i-2]
  print((dp[N]%k))
# Original solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for i in range(m)]
dp=[0]*(n+1)
dp[0]=1
if 1 not in a:
  dp[1]=1
for i in range(n-1):
  if i+2 not in a:
    dp[i+2]=dp[i+1]+dp[i]
  else:
    dp[i+2]=0
print((dp[n]%(10**9+7)))

# Optimized solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for i in range(m)]
dp=[1]*(n+1)
dp[0]=1
dp[1]=1
for i in range(m):
  if a[i]==1:
    dp[1]=0
  else:
    dp[a[i]]=0
for i in range(2,n+1):
  if dp[i]:
    dp[i]=dp[i-1]+dp[i-2]
print((dp[n]%(10**9+7)))