CodeEff/ECCO huggingface dataset:
# Original solution
N, M = list(map(int, input().split()))
a = [0 for i in range(M)]
sosu = 10 ** 9 + 7
for i in range(M):
    a[i] = int(eval(input()))
dp = [0 for i in range(N+1)]
dp[0] = 1
for i in range(1, N+1):
    if i in a:
        pass
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % sosu
print((dp[N]))

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

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

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


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

# Optimized solution
n, m = list(map(int, input().split()))
a = [0 for _ in range(n + 1)]
for i in range(m):
    A = int(eval(input()))
    a[A] = 1

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

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

print((tmp[n] % 1000000007))
# Original solution
MOD = 10**9 + 7

N,M = list(map(int,input().split()))
dp = [0]*(N+1)
dp[0] = 1
A = set(int(eval(input())) for _ in range(M)) # 禁止地帯

for i in range(1,N+1):
  if i in A:
    continue
  x = dp[i-1]
  if i > 1:
    x += dp[i-2]
  dp[i] = x%MOD

answer = dp[N]
print(answer)

# Optimized solution
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,M,*A = list(map(int,read().split()))

MOD = 10**9 + 7

dp = [0] * (N+10)
dp[0] = 1
is_broken = [False] * (N+1)

for x in A:
    is_broken[x] = True

for n in range(1,N+1):
    if is_broken[n]:
        continue
    x = dp[n-1] + dp[n-2]
    if x >= MOD:
        x -= MOD
    dp[n] = x

answer = dp[N]
print(answer)
# Original solution
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:
        dp[i]=0
    else:
        dp[i]=(dp[i-2]+dp[i-1])%mod
print((dp[-1]))


# Optimized solution
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
NG=[False]*n
for i in range(m):
    NG[a[i]-1]=True

for i in range(1,n+1):
    if NG[i-1]==False:
        dp[i]=(dp[i-2]+dp[i-1])%mod
print((dp[-1]))
# Original solution
n, m = list(map(int, input().split()))
a = []
for i in range(m):
  a.append(int(eval(input())))
ans = 0
flag = 0
a = set(a)

#フィボナッチ数列の初期値を調節
dp = [0] * (n+1)
dp[0] = 1
if 1 in a:
  dp[1] = 0
else:
  dp[1] = 1
  
for i in range(2, n+1):
  if dp[i-2] == 0 and dp[i-1] == 0:
    ans = 0
    flag = 1
    break
  elif i in a:
    continue
  else:
    dp[i] = dp[i-1] + dp[i-2]
if flag == 0:
  ans = dp[n]
print((ans%(10**9+7)))

# Optimized solution
n, m = list(map(int, input().split()))
a = []
for i in range(m):
  a.append(int(eval(input())))
ans = 0
flag = 0
a = set(a)

#フィボナッチ数列の初期値を調節
dp = [0] * (n+1)
dp[0] = 1
if 1 in a:
  dp[1] = 0
else:
  dp[1] = 1
  
for i in range(2, n+1):
  if dp[i-2] == 0 and dp[i-1] == 0:
    ans = 0
    flag = 1
    break
  elif i in a:
    continue
  else:
    dp[i] = dp[i-1] + dp[i-2]
    dp[i] = dp[i] % (10**9+7)
if flag == 0:
  ans = dp[n]
print(ans)
# Original solution
def resolve():
    (N, M) = list(map(int, input().split(" ")))
    As = [int(eval(input())) for i in range(M)]

    cnts = [False] * (N+1)
    for i in range(N+1):
        c = 0
        if i in As:
            c = 0
        elif i == 0:
            c = 1
        elif i == 1:
            c = 1
        elif i == 2:
            c = 2 if 1 not in As else 1
        else:
            c = (cnts[i-2] + cnts[i-1])%1000000007
        cnts[i] = c

    print((cnts[N]))

if '__main__' == __name__:
    resolve()

# Optimized solution
def resolve():
    (N, M) = list(map(int, input().split(" ")))
    As = [int(eval(input())) for i in range(M)]
    As.sort()

    cnts = [False] * (N+1)
    ptr = 0
    for i in range(N+1):
        c = 0
        if ptr < len(As) and i == As[ptr]:
            c = 0
            ptr = ptr + 1
        elif i == 0:
            c = 1
        elif i == 1:
            c = 1
        elif i == 2:
            c = 2 if 1 not in As else 1
        else:
            c = (cnts[i-2] + cnts[i-1])%1000000007
        cnts[i] = c

    print((cnts[N]))

if '__main__' == __name__:
    resolve()
# 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(2,n+1):
    if i not in a:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007
#print(dp)
print((dp[n]))

# Optimized solution
n,m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]
a.append(1000000)
dp = [0]*(n+1)
dp[0] = 1
j = 0
if a[j] == 1:
    j += 1
else:
    dp[1] = 1

for i in range(2,n+1):
    if i == a[j]:
        j += 1
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007
#print(dp)
print((dp[n]))
# Original solution
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def pattcount(num):
    if(num < 0): return 0
    result = 1
    ranmax = num // 2 + 1
    for i in range(1, ranmax):
        result += cmb(num-i, i)
    
    return result
    

if __name__ == '__main__':
    n,m = list(map(int, input().split()))

    pattern = 1
    step = 0
    for i in range(m):
        a = int(eval(input()))
        pattern *= pattcount(a - 1 - step)
        step = a + 1

    pattern *= pattcount(n - step)

    print((pattern % 1000000007))


# Optimized solution
if __name__ == '__main__':
    n,m = list(map(int, input().split()))
    a = []
    for i in range(m):
        a.append(int(eval(input())))
    a.append(0)
    ac = 0

    step0 = 0
    step1 = 1
    for i in range(1, n+1):
        temp = step0 + step1
        step0 = step1
        step1 = temp
        if(i == a[ac]):
            step1 = 0
            ac += 1

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


f = []

for i in range(n + 1):
    if i == 0:
        f.append(1)
        continue
    if i in a:
        f.append(0)
        continue
    if i == 1:
        f.append(1)
        continue
    f.append(f[i - 1] + f[i - 2])
    
print((f[n] % 1000000007))


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

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

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

print((dp[n]))
# Original solution
N,M=list(map(int,input().split()))
mod = 10**9+7
def framod(n, mod, a=1):
    for i in range(1,n+1):
        a=a * i % mod
    return a

def power(n, r, mod):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def comb(n, k, mod):
    a=framod(n, mod)
    b=framod(k, mod)
    c=framod(n-k, mod)
    return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod

def cnt(n):
  s = sum([comb(n-i,i,mod)%mod for i in range(n//2+1)])
  s = s%mod
  return s

A0 = 0
ans = 1
for i in range(M):
  A1 = int(eval(input())) - 1
  ans = (ans * cnt(A1-A0))%mod
  A0 = A1+2
ans = (ans * cnt(N-A0))%mod
print(ans)


# Optimized solution
N,M=list(map(int,input().split()))
mod = 10**9+7
fram = [1]
for i in range(1,N+1):
  fram.append(fram[-1]*i%mod)

#def framod(n, mod, a=1):
#    for i in range(1,n+1):
#        a = a * i % mod
#    return a

def power(n, r, mod):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def comb(n, k, mod):
    a=fram[n]
    b=fram[k]
    c=fram[n-k]
    return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod

def cnt(n):
  s = sum([comb(n-i,i,mod)%mod for i in range(n//2+1)])
  s = s%mod
  return s

A0 = 0
ans = 1
for i in range(M):
  A1 = int(eval(input())) - 1
  ans = (ans * cnt(A1-A0))%mod
  A0 = A1+2
ans = (ans * cnt(N-A0))%mod
print(ans)
# Original solution
N,M=list(map(int,input().split()))
mod = 10**9+7
fram = [1]
for i in range(1,N+1):
  fram.append(fram[-1]*i%mod)

#def framod(n, mod, a=1):
#    for i in range(1,n+1):
#        a = a * i % mod
#    return a

def power(n, r, mod):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def comb(n, k, mod):
    a=fram[n]
    b=fram[k]
    c=fram[n-k]
    return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod

def cnt(n):
  s = sum([comb(n-i,i,mod)%mod for i in range(n//2+1)])
  s = s%mod
  return s

A0 = 0
ans = 1
for i in range(M):
  A1 = int(eval(input())) - 1
  ans = (ans * cnt(A1-A0))%mod
  A0 = A1+2
ans = (ans * cnt(N-A0))%mod
print(ans)

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

def main():
    N, M = list(map(int, input().split()))
    a = set([int(eval(input())) for i in range(M)])
    mod = 10**9+7
    #dp[i]　iの位置に到達する最小の値
    dp = [0]*(N+1)
    dp[0] = 1
    for i in range(N):
        if (i+1)<=N and (not i+1 in a):
            dp[i+1] += dp[i]
            dp[i+1] %= mod
        if (i+2)<=N and (not i+2 in a):
            dp[i+2] += dp[i]
            dp[i+2] %= mod

    print((dp[N]))

if __name__ == '__main__':
    main()
# Original solution
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
n,m = list(map(int,input().split()))
rows = [int(eval(input())) for _ in range(m)]

mod = 1000000007

dp=[0 for _ in range(n+1)]

dp[0]=1
for now in range(n):
    for next in range(now+1,min(n,now+2)+1):
        if not next in rows:
            dp[next] += dp[now]
            dp[next] %= mod

print((dp[n]))
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する



# Optimized solution
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
n,m = list(map(int,input().split()))
stair = [True for _ in range(n+1)]
for _ in range(m):
    broken = int(eval(input()))
    stair[broken] = False

mod = 1000000007

dp=[0 for _ in range(n+1)]

dp[0]=1
for now in range(n):
    for next in range(now+1,min(n,now+2)+1):
        if stair[next]:
            dp[next] += dp[now]
            dp[next] %= mod

print((dp[n]))
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# Original solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for i in range(m)]
mod=1000000007
dp=[1,1]
if 1 in a:
  dp[1]=0
for i in range(2,n+1):
  if i in a:
    dp.append(0)
  else:
    dp.append((dp[-1]+dp[-2])%mod)
print((dp[-1]%mod))

# Optimized solution
n,m=list(map(int,input().split()))
a=set([int(eval(input())) for i in range(m)])
mod=1000000007
dp=[1,1]
if 1 in a:
  dp[1]=0
for i in range(2,n+1):
  if i in a:
    dp.append(0)
  else:
    dp.append((dp[-1]+dp[-2])%mod)
print((dp[-1]%mod))
# Original solution
# 初期入力
N,M = (int(x) for x in input().split())
A = [int(eval(input())) for i in range(M)]


#
mod_9 = 10**9 +7
dp =[0]*(N +1)
dp[0] = 1
if 1 not in A:
    dp[1] =1
for i in range(N-1):
    if i+2 in A:
        dp[i+2] = 0
    else:
        dp[i+2] = dp[i+1] + dp[i] 
        dp[i+2] %= mod_9
kotae =dp[N] # % mod_9
print(kotae )

# Optimized solution
# 初期入力
N,M = (int(x) for x in input().split())
A = set([int(eval(input())) for i in range(M)])


#
mod_9 = 10**9 +7
dp =[0]*(N +1)
dp[0] = 1
if 1 not in A:
    dp[1] =1
for i in range(N-1):
    if i+2 in A:
        dp[i+2] = 0
    else:
        dp[i+2] = dp[i+1] + dp[i] 
        dp[i+2] %= mod_9
kotae =dp[N] # % mod_9
print(kotae )
# Original solution
import sys
n, m = list(map(int, input().split()))
br = [int(sys.stdin.readline()) for i in range(m)]

dp = [0 for _ in range(n + 1)]

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



# Optimized solution
n, m = list(map(int, input().split()))
p = {int(eval(input())) for _ in range(m)}
s = 10 ** 9 + 7

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

for i in range(2, n+1):
    if i in p:
        continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % s

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

# Optimized solution
n, m = list(map(int, input().split()))
a = [int(eval(input())) for i in range(m)]
dp = [10**5 for i in range(n+1)]
for i in a:
        dp[i] = 0

a.sort()
for i in range(1,n+1):
        if dp[i] == 0:
                continue
        if i == 1:
                dp[i] = 1
                continue
        if i == 2:
                if dp[i-1] == 0:
                        dp[i] = 1
                else:
                        dp[i] = 2
                continue
        if dp[i-1] == 0:
                dp[i] = dp[i-2]
                continue
        if dp[i-2] == 0:
                dp[i] = dp[i-1]
                continue
        dp[i] = (dp[i-1]+dp[i-2])%(10**9+7)
        #print (dp[i])
print((dp[-1]%(10**9+7)))
# Original solution
import sys
big=10**9+7

def modsum(a,b):
  return a%big +b%big

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

a = [0]*m
for i in range(m):
  a[i] = int(eval(input()))
  
#連続こわれ
for i in range(m-1):
  if a[i]+1 == a[i+1]:
    print((0))
    sys.exit(0)

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

for i in range(2,n+1):
  if i not in a:
    cho[i] = modsum(cho[i-1], cho[i-2])


print((cho[-1]%big))

# Optimized solution

big=10**9+7

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

a = set([int(eval(input())) for _ in range(m)])
  

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

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


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

dp[0] = 1

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

print((dp[n]))


# Optimized solution
import itertools
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
dp[1] = 0 if 1 in a else 1

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

print((dp[n]))
# Original solution
N, M = list(map(int, input().split()))
a = [int(eval(input())) for i in range(M)]

dp = [0, 1]

for i in range(1, N + 1):
    if i in a:
        dp.append(0)
        continue
    dp.append(dp[i - 1] + dp[i])

print((dp[N + 1] % 1000000007))


# Optimized solution
N, M = list(map(int, input().split()))
a = [int(eval(input())) for i in range(M)]
a.append(0)
dp = [0, 1]
a_flag = 0

for i in range(1, N + 1):
    if i == a[a_flag]:
        dp.append(0)
        a_flag += 1
        continue
    dp.append(dp[i - 1] + dp[i])

print((dp[N + 1] % 1000000007))
# Original solution
n,m = list(map(int,input().split()))
dp = [0 for i in range(n+1)]
for i in range(m):
    j = int(eval(input()))
    dp[j] = -1
dp[0] = 1
dp[1] = 1 if dp[1] != -1 else 0
for i in range(2,n+1):
    if dp[i] == -1:
        dp[i] = 0
        continue
    dp[i] = dp[i-1] + dp[i-2]
print((dp[n]%1000000007))

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

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

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

dp = [1,1]
temp = 1
if 1 in a: dp[1] = 0
  
for i in range(2,n+1):
  if i in a: dp.append(0)
  else: dp.append(dp[i-1] + dp[i-2])

print((dp[n]%1000000007))

# Optimized solution
N, M = list(map(int, input().split()))
A = set([int(eval(input())) for _ in range(M)])
 
dp = [0, 1]
for i in range(N):
    if i+1 in A: dp.append(0)
    else: dp.append(dp[i]+dp[i+1])
print((dp[N+1]%1000000007))
# Original solution
N,M = list(map(int,input().split()))
a = [int(eval(input())) for _ in range(M)]


MOD = 1000000007

d = [0] * (N+1)
d[0] = 1
if(1 in a):
    d[1] = 0
else:
    d[1] = 1

for i in range(2,N+1):
    if(i in a):
        d[i] = 0
    else:
        d[i] = d[i-1] + d[i-2]
    d[i] %= MOD

print((d[-1]))


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

MOD = 1000000007

d = [0] * (N+1)
OK = [True]*(N+1)
d[0] = 1

for i in range(M):
    OK[a[i]] = False

#print(OK)

if(OK[1]):
    d[1] = 1
else:
    d[1] = 0

for i in range(2,N+1):
    if(OK[i-1]):
        d[i] += d[i-1]
    if(OK[i-2]):
        d[i] += d[i-2]
    d[i] %= MOD
    '''
    if(i in a):
        d[i] = 0
    else:
        d[i] = d[i-1] + d[i-2]
    d[i] %= MOD
    '''

print((d[-1]))
# Original solution
n,m = list(map(int,input().split()))

a = []
dp = []
mod = 1000000007

for i in range(100100):
	a.append(0)
	dp.append(0)

for i in range(m):
	num = int(eval(input()))
	a[num] = 1

dp[0]=1

for i in range(1,n+1):
	if a[i] == 1:
		continue

	dp[i] += dp[i-1]
	if i>1:
		dp[i] += dp[i-2]

	dp[i] = dp[i] % mod

print((dp[n]%mod))

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

a = [0] * (n+1)
dp = [0] * (n+1)
mod = 1000000007

for i in range(m):
	num = int(eval(input()))
	a[num] = 1

dp[0]=1

for i in range(1,n+1):
	if a[i] == 1:
		continue

	dp[i] += dp[i-1]
	if i>1:
		dp[i] += dp[i-2]

	dp[i] = dp[i] % mod

print((dp[n]%mod))
# Original solution
n,m = list(map(int,input().split()))

a = [0] * (n+1)
dp = [0] * (n+1)
mod = 1000000007

for i in range(m):
	num = int(eval(input()))
	a[num] = 1

dp[0]=1

for i in range(1,n+1):
	if a[i] == 1:
		continue

	dp[i] += dp[i-1]
	if i>1:
		dp[i] += dp[i-2]

	dp[i] = dp[i] % mod

print((dp[n]%mod))

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

a = [0] * (n+2)
dp = [0] * (n+2)
mod = 1000000007

for i in range(m):
	num = int(eval(input()))
	a[num] = 1

dp[0]=1

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

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


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


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





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

t2 = 0
t1 = 1

for i in range(1,n+1):
  if l == [] or i != l[0]:
    t0 = (t2+t1)%mod
  else:
    l.pop(0)
    t0 = 0
  t2 = t1
  t1 = t0

print(t0)

# Optimized 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)