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

dp = [0] * (n + 1)
dp[0] = 1
b = a[0]
j = 1
for i in range(1, n + 1):
    if i == b:
        b = a[j]
        j += 1
    else:
        tmp = dp[i - 2] + dp[i - 1]
        if tmp >= mod:
            tmp -= mod
        dp[i] = tmp
print((int(dp[-1])))

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

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

dp = [0] * (n + 1)
dp[0] = 1
b = a[0]
j = 1
for i in range(1, n + 1):
    if i == b:
        b = a[j]
        j += 1
    else:
        tmp = dp[i - 2] + dp[i - 1]
        if tmp >= mod:
            tmp -= mod
        dp[i] = tmp
print((int(dp[-1])))
# Original solution
import sys
sys.setrecursionlimit(10 ** 5 + 10)
mod = 10 ** 9 + 7

# フィボナッチ数列
fib_memo = {}
def fib(N):
    if N < 2: return 1
    if N not in fib_memo:
        fib_memo[N] = fib(N-1) + fib(N-2)
    return fib_memo[N]

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

tmp_list = [0] * (M+1)
now_kaidan = 0
for i in range(M):
    tmp_list[i] = (A[i] - 1) - now_kaidan
    now_kaidan = A[i] + 1
tmp_list[-1] = N-now_kaidan
ans = 1

for v in tmp_list:
    if v == -1:     # 壊れた階段が連続している時は0移動方法がない
        print((0))
        exit()
    ans *= fib(v)
    ans %= mod

print((ans%mod))

# Optimized solution
# DP
mod = 10 ** 9 + 7
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]

if N == 1:
    print((1))
    exit()
if N == 2:
    if M == 0:
        print((2))
    if M == 1:
        print((1))
    exit()

safe = [True] * (N+1)
for i in range(M):
    safe[A[i]] = False 

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

if 1 in A:
    dp[1] = 0
    dp[2] = 1
if 2 in A:
    dp[2] = 0

for i in range(3, N+1):
    if safe[i]:
        dp[i] = dp[i-1] + dp[i-2]

##print(dp)
print(((dp[N]+mod)%mod))
# Original solution
import sys


input = sys.stdin.readline

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

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

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

print((pattern[n] % (10**9+7)))


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

mod = 10**9+7
n, m = list(map(int, input().split()))
broken = set(int(eval(input())) for i in range(m))

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

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

print((pattern[n]))
# Original solution
#d=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
#import numpy as np
#n=int(input())
#import fractions
#import math
#lis=list(input().split())
#lis=list(map(float,input().split()))
#n=int(input())
#S=input()
import itertools

lis=list(map(int,input().split()))
alist=[-1]
ans=1
for i in range(lis[1]):
    alist.append(int(eval(input())))
alist.append(lis[0]+1)

for i in range(lis[1]+1):
    l=alist[i+1]-alist[i]-2
    tmp=0
    t=int((l+l%2)/2)
    h=int((l-l%2)/2)
    for j in range(h+1):
        tmp+=len(list(itertools.combinations(list(range(t+j)),h-j)))%((10**9)+7)
    ans=(ans*tmp)%((10**9)+7)
print(ans)


# Optimized solution
lis=list(map(int,input().split()))
alist=[]
for i in range(lis[1]):
    alist.append(int(eval(input())))
steps=[0]*(lis[0]+2)
steps[1]=1
for i in range(2,lis[0]+2):
    if i-1 not in alist:
        steps[i]=(steps[i-1]+steps[i-2])%((10**9)+7)
ans=steps[-1]
print(ans)
# Original solution
lis=list(map(int,input().split()))
alist=list([int(eval(input())) for _ in range(lis[1])])
steps=[0]*(lis[0]+2)
steps[1]=1
for i in range(2,lis[0]+2):
    if i-1 not in alist:
        steps[i]=(steps[i-1]+steps[i-2])
ans=steps[-1]%((10**9)+7)
print(ans)


# Optimized solution
lis=list(map(int,input().split()))
alist=[0]*(lis[0]+1)
for i in range(lis[1]):
    a=int(eval(input()))
    alist[a]=1
steps=[0]*(lis[0]+2)
steps[1]=1
mod=(10**9)+7
for i in range(2,lis[0]+2):
    if alist[i-1]==0:
        steps[i]=(steps[i-1]+steps[i-2])%mod
ans=steps[-1]
print(ans)
# Original solution
n,m=list(map(int,input().split()))
lst=[int(eval(input())) for i in range(m)]
DP=[0]*(n+1)
temp=0
DP[0]=1
for i in range(1, n+1):
  if i==1 and i not in lst:
    DP[i]=1
  elif i==1 and i in lst:
    DP[i]=0
  elif i in lst:
    DP[i]=0
  else:
    DP[i]=(DP[i-1]+DP[i-2])%(10**9+7)
print((DP[n]))

# Optimized solution
N,M=list(map(int,input().split()))
br=set([int(eval(input())) for _ in range(M)])
dp=[0]*(N+1)
dp[0]=1
if not 1 in br:
    dp[1]=1
for i in range(2,N+1):
    if not i in br:
        dp[i]+=(dp[i-1]+dp[i-2])%1000000007
print((dp[-1]))
# Original solution
n, m = list(map(int, input().split()))
mod = 10**9+7
facs = [1] * (n-m+1)
invs = [1] * (n-m+1)
nfac = 1
for i in range(1, n-m+1):
    nfac = nfac * i % mod
    facs[i] = nfac
    invs[i] = pow(facs[i], mod-2, mod)

ans = 1
start = 0
def steps(start, end):
    t = end - start
    pat = 0
    for j in range(t//2+1):
        pat += (facs[t-j] * invs[j] * invs[t-j-j]) % mod
    return pat%mod

for i in range(m):
    a = int(eval(input()))
    end = a-1
    if start == end+1:
        print((0))
        break
    # startからendまで行く方法
    ans *= steps(start, end)
    ans %= mod
    start = a+1
else:
    ans *= steps(start, n)
    ans %= mod
    print(ans)


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

for i in range(2, n+1):
    if not i-1 in seta:
        dp[i] += dp[i-1]
    if not i-2 in seta:
        dp[i] += dp[i-2]
    dp[i] %= mod

print((dp[-1]))
# Original solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for _ in range(m)]

#TLEの対策.配列ではなく変数を使う.
p,q=0,1

for i in range(1,n+1):
    #最新のp,q以前の値は捨てて良い.つまり配列を使用する必要なし.
    p,q=q,(p+q)%(10**9+7)*(not i in a) #n*Trueは1, n*Falseは0を表す.
print(q)

# Optimized solution
n,m=list(map(int,input().split()))
#TLEの対策1. a in listと比べて a in setはめちゃんこ速い!!
a=set([int(eval(input())) for _ in range(m)])

#TLEの対策2.配列ではなく変数を使う(対策1と比べると対して効果なし).
p,q=0,1

for i in range(1,n+1):
    #最新のp,q以前の値は捨てて良い.つまり配列を使用する必要なし.
    p,q=q,(p+q)%(10**9+7)*(not i in a) #n*Trueは1, n*Falseは0を表す.
print(q)
# Original solution
n,m=list(map(int,input().split()))
#TLEの対策1. a in listと比べて a in setはめちゃんこ速い!!
a=set([int(eval(input())) for _ in range(m)])

#TLEの対策2.配列ではなく変数を使う(対策1と比べると対して効果なし).
p,q=0,1

for i in range(1,n+1):
    #最新のp,q以前の値は捨てて良い.つまり配列を使用する必要なし.
    p,q=q,(p+q)%(10**9+7)*(not i in a) #n*Trueは1, n*Falseは0を表す.
print(q)

# Optimized solution
n, m = list(map(int, input().split()))
A = set([int(eval(input())) for _ in range(m)])
p, q = 0, 1
mod = 10 **9 + 7
for i in range(1, n+1):
    p, q = q, ((p+q)%mod)*(i not in A)
print(q)
# Original solution
n, m = [int(x) for x in input().split()]

a = [int(eval(input())) for x in range(m)]
_MOD = 1000000007

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

if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1

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

print((dp[n]))

# Optimized solution
n, m = [int(x) for x in input().split()]

#a = [int(input()) for x in range(m)]
a = set(int(eval(input())) for x in range(m))
_MOD = 1000000007

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

if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1

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

print((dp[n]))
# Original solution
import sys

n, m = list(map(int, sys.stdin.readline().split()))
A = [int(sys.stdin.readline()) for _ in range(m)]

dp = [0 for i in range(n+1)]
dp[0] =1
#print(dp)

for i in range(1, n+1):
    if i in A:
        continue
    if i-2>=0:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[i-1]


print((dp[-1]%1000000007))


# Optimized solution
import sys

n, m = list(map(int, sys.stdin.readline().split()))
A = [int(sys.stdin.readline()) for _ in range(m)]
bloken = [0 for i in range(n+1)]
for a in A:
    bloken[a]=1
    

dp = [0 for i in range(n+1)]
dp[0] =1
#print(dp)

for i in range(1, n+1):
    if bloken[i]==1:
        continue
    if i-2>=0:
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[i-1]


print((dp[-1]%1000000007))
# Original solution
n,m = list(map(int,input().split()))
ais = []
for _ in range(m):
    ai = int(eval(input()))
    ais.append(ai)
dp = [0]*(n+1)
dp[0]=1
if 1 in ais:
  dp[1]=0
else:
  dp[1]=1
for i in range(2,n+1):
    if i in ais:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]
print((dp[n]%1000000007))

# Optimized solution
n,m = list(map(int,input().split()))
ais = []
for _ in range(m):
    ai = int(eval(input()))
    ais.append(ai)
dp = [0]*(n+1)
dp[0]=1
if len(ais)>0 and ais[0]==1:
  dp[1]=0
  ais.pop(0)
else:
  dp[1]=1
for i in range(2,n+1):
    if len(ais)>0 and ais[0]==i:
        dp[i] = 0
        ais.pop(0)
    else:
        dp[i] = dp[i-1] + dp[i-2]
print((dp[n]%1000000007))
# Original solution
import sys
n,m=list(map(int,input().split()))
arr=[1,2]
arr=arr+[0]*(n-2)
danger=list(map(int,sys.stdin))
danger.append(0)
if 1 in danger:
  arr[0]=0
  arr[1]=1
for i in range(n):
  if i+1 in danger:
    arr[i]=0
  elif i==0 or i==1:
    continue 
  else:
    arr[i]=(arr[i-1]+arr[i-2])%(10**9+7)
print((arr[n-1]%(10**9+7)))


# Optimized solution
import sys
n,m=list(map(int,input().split()))
arr=[1,2]
arr=arr+[0]*(n-2)
danger=list(map(int,sys.stdin))
danger.append(0)
m=0
if 1 == danger[0]:
  arr[0]=0
  arr[1]=1
  m=1
for i in range(n):
  if i+1 == danger[m]:
    arr[i]=0
    m+=1
  elif i==0 or i==1:
    continue 
  else:
    arr[i]=(arr[i-1]+arr[i-2])%(10**9+7)
print((arr[n-1]%(10**9+7)))
# Original solution
n,m = list(map(int,input().split()))
ab = []
for _ in range(m):
    a=int(eval(input()))
    ab.append(a)

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

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

print((dp[-1]))

# 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 i in range(1, N+1):
    dp[i] = (dp[i-1] + dp[i-2]) % (10**9+7)
    if i in a:
        dp[i] = 0
print((dp[N]))
# Original solution
from collections import deque

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

tmp = [0 for _ in range(N + 1)]

if 1 not in A:
    tmp[1] = 1
    
if 2 not in A and N >= 2:
    tmp[2] = tmp[1] + 1

for i in range(3, N+1):
    
    if i not in A:
        tmp[i] = tmp[i-1] + tmp[i-2] 
        

    
print((tmp[-1]%(10**9+7)))




# Optimized solution
from collections import deque

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

tmp = [0 for _ in range(N + 1)]

now = 0
if 1 not in A:
    tmp[1] = 1
    
else:
    now += 1
    
if (2 not in A) and N >= 2:
    tmp[2] = tmp[1] + 1
    
else:
    now += 1

for i in range(3, N+1):
    
    try:
        if i != A[now]:
            tmp[i] = tmp[i-1] + tmp[i-2] 
            
        else:
            now += 1
        
    except:
        tmp[i] = tmp[i-1] + tmp[i-2] 

    
print((tmp[-1]%(10**9+7)))
# Original solution
# C - Typical Stairs
N,M = list(map(int,input().split()))
A = [int(eval(input())) for _ in range(M)]
A = set(A)

# dp[i]: i 段目まで来た時の移動方法の総数
dp = [0]*(N+1)

# 初期条件
dp[0] = 1

for v in range(1,N+1):
    if v in A:
        continue
    dp[v] = (dp[v] + dp[v-1])%(1000000007)
    if v > 1:
        dp[v] = (dp[v] + dp[v-2])%(1000000007)
print((dp[N]))

# Optimized solution
#96 C - Typical Stairs
N,M = list(map(int,input().split()))
A = [int(eval(input())) for _ in range(M)]
A = set(A)
MOD = 1000000007

dp = [0]*(N+1)
dp[0] = 1
for i in range(1,N+1):
    if i in A:
        continue
    dp[i] = (dp[i-1] + dp[i-2])%MOD
print((dp[N]))
# Original solution
import math

N,M = list(map(int,input().split(' ')))
An = [ int(eval(input())) for _ in range(M)]

'''
factorial_list = [1] * (N+1)
for i in range(1,N+1):
    factorial_list[i] = factorial_list[i-1] * i

def combinations_count(n, r):
    return factorial_list[n] // (factorial_list[n - r] * factorial_list[r])
'''

def nCk(n, k):
    ret = 1
    mo = 10**9 + 7
    for i in range(k):
        ret = ret * (n - i) * pow(i + 1, mo - 2, mo) % mo
    return ret

def one_two_comb(N):
    two_n = N//2
    comb_list = []
    for i in range(1,two_n+1):
        comb_list.append([N-i,i])
    return comb_list

def sum_comb(comb_list):
    comb_sum = 0
    for val in comb_list:
        comb_sum += nCk(val[0],val[1])
    return comb_sum
    

diff_list = []
current_num = 0
max_diff = -1
for a in An:
    diff = a - current_num
    if diff == 0:
        print((0))
        exit(0)
    diff_list.append(diff)
    current_num = a +1
diff = N+1 - current_num
diff_list.append(diff)
#print(diff_list)


all_sum = 1
for idx,diff in enumerate(diff_list):
    if idx == 0 or len(diff_list):
        diff -= 1
    '''
    else:
        diff -= 2
    '''

    if diff == 0:
        all_sum *= 1
    else:
        internal_comb_list = one_two_comb(diff)
        comb_count = sum_comb(internal_comb_list) + 1
        if all_sum > 10**9+7:
            all_sum = all_sum%(10**9+7)
        all_sum *= comb_count
print((all_sum%(10**9+7)))



# Optimized solution
import math

N,M = list(map(int,input().split(' ')))
An = [ int(eval(input())) for _ in range(M)]

'''
factorial_list = [1] * (N+1)
for i in range(1,N+1):
    factorial_list[i] = factorial_list[i-1] * i

def combinations_count(n, r):
    return factorial_list[n] // (factorial_list[n - r] * factorial_list[r])
'''

feruma_list = [1] * (N+1)
for i in range(2,N+1):
    feruma_list[i] = feruma_list[i-2] + feruma_list[i-1]


def nCk(n, k):
    ret = 1
    mo = 10**9 + 7
    for i in range(k):
        ret = ret * (n - i) * pow(i + 1, mo - 2, mo) % mo
    return ret

def one_two_comb(N):
    two_n = N//2
    comb_list = []
    for i in range(1,two_n+1):
        comb_list.append([N-i,i])
    return comb_list

def sum_comb(comb_list):
    comb_sum = 0
    for val in comb_list:
        comb_sum += nCk(val[0],val[1])
    return comb_sum
    

diff_list = []
current_num = 0
max_diff = -1
for a in An:
    diff = a - current_num
    if diff == 0:
        print((0))
        exit(0)
    diff_list.append(diff)
    current_num = a +1
diff = N+1 - current_num
diff_list.append(diff)
#print(diff_list)


all_sum = 1
for idx,diff in enumerate(diff_list):
    
    if idx == 0 or len(diff_list):
        diff -= 1
    '''
    if diff == 0:
        all_sum *= 1
    else:
        internal_comb_list = one_two_comb(diff)
        comb_count = sum_comb(internal_comb_list) + 1
        if all_sum > 10**9+7:
            all_sum = all_sum%(10**9+7)
        all_sum *= comb_count
    '''

    comb_count = feruma_list[diff]
    if all_sum > 10**9+7:
        all_sum = all_sum%(10**9+7)
    all_sum *= comb_count

print((all_sum%(10**9+7)))
# Original solution
def resolve():
	modu = 1000000007
	n, m = list(map(int, input().split()))
	a = [False]*n
	for _ in range(m):
		a[int(eval(input()))] = True
	dp = [0]*(n+1)
	dp[0], dp[1] = 1, 1
	for i in range(2, n+1):
		if i in a:
			continue
		multi = []
		if not a[i-1]:
			multi.append(dp[i-1])
		if not a[i-2]:
			multi.append(dp[i-2])
		dp[i] = sum(multi) % modu
	print((dp[-1]))
resolve()

# Optimized solution
def resolve():
	modu = 1000000007
	n, m = list(map(int, input().split()))
	a = [False]*n
	for _ in range(m):
		a[int(eval(input()))] = True
	dp = [0]*(n+1)
	dp[0], dp[1] = 1, 1
	for i in range(2, n+1):
		if i < n and a[i]:
			continue
		multi = []
		if not a[i-1]:
			multi.append(dp[i-1])
		if not a[i-2]:
			multi.append(dp[i-2])
		dp[i] = sum(multi) % modu
	print((dp[-1]))
resolve()
# Original solution
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = list(map(int, input().split()))
    a = list()
    for i in range(m):
        a.append(int(eval(input())))

    dp = [0] * (n + 1)

    if 1 not in a:
        dp[1] = 1

    if n > 1:
        if 2 not in a:
            dp[2] = 1 + dp[1]

        for i in range(3, n + 1):
            if i not in a:
                dp[i] = (dp[i-2] + dp[i-1]) % mod

    print((dp[n]))


# Optimized solution
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = list(map(int, input().split()))
    a = list()
    for i in range(m):
        a.append(int(eval(input())))

    dp = [0] * (n + 1)

    for aa in a:
        dp[aa] = -1

    if dp[1] != -1:
        dp[1] = 1
    else:
        dp[1] = 0

    if n > 1:
        if dp[2] != -1:
            dp[2] = 1 + dp[1]
        else:
            dp[2] = 0

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

    print((dp[n]))
# Original solution
if __name__ == "__main__":
    mod = 10 ** 9 + 7
    n, m = list(map(int, input().split()))
    a = list()
    for i in range(m):
        a.append(int(eval(input())))

    dp = [0] * (n + 1)

    for aa in a:
        dp[aa] = -1

    if dp[1] != -1:
        dp[1] = 1
    else:
        dp[1] = 0

    if n > 1:
        if dp[2] != -1:
            dp[2] = 1 + dp[1]
        else:
            dp[2] = 0

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

    print((dp[n]))


# Optimized solution
def solve(N, a):
    mod = 10**9 + 7
    dp = [0] * (N+1)
    step = [0] * (N+1)
    for aa in a:
        step[aa] = 1

    dp[0] = 1
    if step[1] == 0:
        dp[1] = 1

    for i in range(2, N+1):
        if step[i] == 0:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= mod

    return dp[N]


if __name__ == "__main__":
    N, M = list(map(int, input().split()))
    a = [int(eval(input())) for _ in range(M)]

    print((solve(N, a)))
# Original solution
N, M = list(map(int, input().split()))
a_list = [int(eval(input())) for _ in range(M)]

mod = 10 ** 9 + 7

dp = [0] * (N + 3)
dp[0] = 1
not_use = [False] * (N + 3)
for a in a_list:
    not_use[a] = True

for i in range(N+1):
    not_u = not_use[i]
    if not_u:
        continue
    else:
        if i < N:
            dp[i + 1] += dp[i]
            dp[i + 1] %= mod
        if i < N - 1:
            dp[i + 2] += dp[i]
            dp[i + 2] %= mod

print((dp[N] % mod))


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

mod = 10 ** 9 + 7

dp = [0] * (N + 100)
dp[0] = 1
not_use = [False] * (N + 100)
for a in a_list:
    not_use[a] = True

for i in range(N+1):
    not_u = not_use[i]
    if not_u:
        continue
    else:
        dp[i + 1] += dp[i]
        dp[i + 1] %= mod
        dp[i + 2] += dp[i]
        dp[i + 2] %= mod

print((dp[N] % mod))
# Original solution
N, M = list(map(int, input().split()))
a_list = [int(eval(input())) for _ in range(M)]

mod = 10 ** 9 + 7

dp = [0] * (N + 100)
dp[0] = 1
a_set = set(a_list)

for i in range(N+10):
    if i in a_set:
        continue
    else:
        dp[i + 1] += dp[i]
        dp[i + 1] %= mod
        dp[i + 2] += dp[i]
        dp[i + 2] %= mod

print((dp[N] % mod))


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

mod = 10 ** 9 + 7

dp = [0] * (N + 100)
dp[0] = 1
a_set = set(a_list)

for i in range(N):
    if i in a_set:
        continue
    else:
        dp[i + 1] += dp[i]
        dp[i + 1] %= mod
        dp[i + 2] += dp[i]
        dp[i + 2] %= mod

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

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

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

for i in range(1, N+1):
    if i in a:
        dp[i] = 0
        if dp[i-1] == 0:
            ans = 0
            break
    else:
        if i > 1:
            dp[i] = dp[i-1] + dp[i-2]
        else:
            dp[i] = dp[i-1]

else:
    ans = dp[-1] % 1000000007

print(ans)


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

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

dp[0] = 1
mod = 1000000007

for i in range(1, N+1):
    if dp[i] == 0:
        continue
    else:
        if i > 1:
            dp[i] = (dp[i-1] + dp[i-2]) % mod
        else:
            dp[i] = dp[i-1] % mod

print((dp[-1]))
# Original solution

import sys
sys.setrecursionlimit(1000000)

# 壊れている床を無視すればフィボナッチ数になってる
from collections import defaultdict

def Fib(n, dd, broken):
    if n in broken:
        return 0

    if dd[n] != 0:
        return dd[n]

    if n <= 1:
        return 1

    x = Fib(n-1, dd, broken) + Fib(n-2, dd, broken)
    dd[n] = x
    return x

dd = defaultdict(int)

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

ans = Fib(n, dd, A)
print((ans % 1000000007))

# Optimized solution

# 壊れている床を無視すればフィボナッチ数になってる
from collections import defaultdict

def Fib(n, broken):
    dd = defaultdict(int)

    dd[0] = 1

    for i in range(n):
        for j in range(i+1, min(n, i+2)+1):
            if broken[j] == 0:
                dd[j] += dd[i]
                dd[j] %= 1000000007

    return dd[n]


n, m = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(m)]
broken = defaultdict(int)
for c in A:
    broken[c] = 1

ans = Fib(n, broken)
print((ans % 1000000007))
# Original solution

# 壊れている床を無視すればフィボナッチ数になってる
from collections import defaultdict

def Fib(n, broken):
    dd = defaultdict(int)

    dd[0] = 1
    dd[1] = 1

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

    return dd[n]


n, m = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(m)]
broken = defaultdict(int)
for c in A:
    broken[c] = 1

ans = Fib(n, broken)
print((ans % 1000000007))

# Optimized solution

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

N, M = list(map(int, input().split()))
A = [0] * M
dp = [-1] * (N+1)

for i in range(M):
    a = int(eval(input()))
    dp[a] = 0

dp[0] = 1
if dp[1] != 0:
    dp[1] = 1

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

print((dp[N] % 1000000007))
# Original solution

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

N, M = list(map(int, input().split()))
A = [0] * M
dp = [-1] * (N+1)

for i in range(M):
    a = int(eval(input()))
    dp[a] = 0

dp[0] = 1
if dp[1] != 0:
    dp[1] = 1

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

print((dp[N] % 1000000007))

# Optimized solution

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

N, M = list(map(int, input().split()))
A = [0] * M
dp = [-1] * (N+1)

for i in range(M):
    a = int(eval(input()))
    dp[a] = 0

dp[0] = 1
if dp[1] != 0:
    dp[1] = 1

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

print((dp[N]))