CodeEff/ECCO huggingface dataset:
# Original solution
Mod = 10**9+7
N,M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
b = [1]
b_append = b.append
for i in range(1,N+1):
    if i in a:
        b.append(0)
        continue
    if i == 1:
        b.append(1)
        continue
    b.append(b[i-1]+b[i-2])
    if b[i] >= Mod:
        b[i] %= Mod
print((b[N]))

# Optimized solution
Mod = 10**9+7
N,M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
b = [1]*(N+1)
for j in a:
    b[j] = 0
for i in range(1,N+1):
    if b[i] == 0:
        continue
    if i == 1:
        b[1] = 1
        continue
    b[i] = b[i-1]+b[i-2]
    if b[i] >= Mod:
        b[i] %= Mod
print((b[N]))
# Original solution
N,M=list(map(int,input().split()))
mod=10**9+7
dp=[0 for i in range(N+1)]
dp[0]=1
dp[-1]=0
A=[]
for i in range(M):
  A.append(int(eval(input())))
#print(A)
for i in range(1,N+1):
  if dp[i-1]==0 and dp[i-2]==0:
    break
  elif i in A:
    continue
  else:
    dp[i]=(dp[i-1]+dp[i-2])%mod
print((dp[N]%mod))


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

mod = 1000000007

dp = [0 for _ in range(N + 1)]
dp[0] = 1
if 1 not in A:
    dp[1] = 1

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


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

mod = 1000000007

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

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

    if dp[n] >= mod:
        dp[n] -= mod

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

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

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

dp = [1]
if 1 in displace:
    dp.append(0)
else:
    dp.append(1)

for i in range(2,n+1):
    next_case = 0
    if i not in displace:
        next_case += dp[i-1]+dp[i-2]
    dp.append(next_case%1000000007)
print((dp[-1]))

# Optimized solution
n,m = list(map(int,input().split()))
displace = {}
for _ in range(m):
    displace[int(eval(input()))] = 1
dp = {0:1}
if 1 in displace:
    dp[1] = 0
else:
    dp[1] = 1

for i in range(2,n+1):
    next_case = 0
    if i not in displace:
        next_case += dp[i-1]+dp[i-2]
    dp[i] = next_case%1000000007
print((dp[n]))
# Original solution
import sys
sys.setrecursionlimit(500000)
from bisect import bisect_left
N, M = list(map(int, input().split()))
A = [int(eval(input())) for i in range(M)]

from functools import lru_cache
@lru_cache(maxsize=None)
def fibo(n):
    ind = bisect_left(A, n)
    if ind < M and n == A[ind]:
        return 0
    elif n == 0 or n == 1:
        return 1
    return fibo(n-2) + fibo(n-1)

print((fibo(N) % 1000000007))

# Optimized solution
N, M = list(map(int, input().split()))
A = set([int(eval(input())) for i in range(M)])
t = 10**9+7
import sys
sys.setrecursionlimit(500000)
from functools import lru_cache
@lru_cache(maxsize=None)
def fibo(n):
    if n in A:
        return 0
    elif n == 0 or n == 1:
        return 1
    return (fibo(n-2) + fibo(n-1)) % t
print((fibo(N) % t))
# Original solution
n,m = list(map(int, input().split()))
a = [int(eval(input())) for i in range(m)]
mod = 10**9+7
# i番目にたどり着く総数
dp = [0 for i in range(n+1)]
dp[0] = 1
if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1
for i in range(n-1):
    if i+2 in a:
        dp[i+2] = 0
    else:
        dp[i+2] = (dp[i] + dp[i+1])%mod
print((dp[n]))

# Optimized solution
n,m = list(map(int, input().split()))
break_stair = [False for i in range(n)]
for i in range(m):
    break_stair[int(eval(input()))-1] = True
mod = 10**9+7
# i番目にたどり着く総数
dp = [0 for i in range(n+1)]
dp[0] = 1
if break_stair[0]:
    dp[1] = 0
else:
    dp[1] = 1
for i in range(n-1):
    if break_stair[i+1]:
        dp[i+2] = 0
    else:
        dp[i+2] = (dp[i] + dp[i+1])%mod
print((dp[n]))
# Original solution
N, M = list(map(int,input().split()))
A_list = [int(eval(input())) for _ in range(M)]
Dp_list = [0] * (N+1)
Dp_list[0] = 1
inf = 1000000007

if 1 in A_list:
    Dp_list[1] = 0
else:
    Dp_list[1] = 1

if N != 1:
    for i in range(2, N + 1):
        if i in A_list:
            continue

        Dp_list[i] = Dp_list[i-2] + Dp_list[i-1]
        Dp_list[i] %= inf
    print((Dp_list[N]))
else:
    print((1))

# Optimized solution
N, M = list(map(int,input().split()))
A_list = set([int(eval(input())) for _ in range(M)])
Dp_list = [0] * (N+1)
Dp_list[0] = 1

if 1 in A_list:
    Dp_list[1] = 0
else:
    Dp_list[1] = 1

if N != 1:
    for i in range(2, N + 1):
        if i in A_list:
            continue

        Dp_list[i] = Dp_list[i-2] + Dp_list[i-1]
        Dp_list[i] %= 1000000007
    print((Dp_list[N]))
else:
    print((1))
# Original solution
N, M = [int(nm) for nm in input().split()]
A = []
for m in range(M):
  A.append(int(eval(input())))

C = [1, 0] # [-2段目, -1段目]
C += [0]*(N+10) # C = [-2段目, -1段目, 0段目, 1段目, 2段目, ...]
for n in range(0, N+1):
  if n not in A:
    C[n+2] = (C[n] + C[n+1]) % 1000000007
  else: # n in A:
    C[n+2] = 0

ans = C[N+2]  % 1000000007
print(ans)

# Optimized solution
N, M = [int(nm) for nm in input().split()]
if M != 0:
  a = int(eval(input()))

C = [1, 0] # [-2段目, -1段目]
C += [0]*(N+10) # C = [-2段目, -1段目, 0段目, 1段目, 2段目, ...]
for n in range(0, N+1):
  if M == 0:
    C[n+2] = (C[n] + C[n+1]) % 1000000007
  else: # M > 0:
    if n != a:
      C[n+2] = (C[n] + C[n+1]) % 1000000007
    else: # n == a:
      C[n+2] = 0
      M -= 1
      if M > 0:
        a = int(eval(input()))

ans = C[N+2]  % 1000000007
print(ans)
# Original solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for i in range(m)]
mod=10**9+7

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

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

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



# Optimized solution
N,M = list(map(int,input().split()))
a = set(int(eval(input())) for x in range(M))
A = [0]*(N+1)
mod = 1000000007
A[0] = 1
if not(1 in a):
  A[1] = 1
for i in range(2,N+1):
    if i in a:
      A[i] = 0
    else:
      A[i] = (A[i-2] + A[i-1]) % mod
print((A[N]))
# Original solution
import sys
sys.setrecursionlimit(10 ** 9)
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, M = lr()
A = []
for m in range(M):
    a = ir()
    A.append(a)
C = [0 for _ in range(N+1)]
C[0] = 1
for i in range(len(C)):
    if i in A:
        continue
    if i >= 2:
        C[i] += C[i-2]
        C[i] += C[i-1]
        C[i] %= 1000000007
    elif i >= 1:
        C[i] += C[i-1]
        C[i] %= 1000000007

print((C[N] % 1000000007))


# Optimized solution
import sys
sys.setrecursionlimit(10 ** 9)
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, M = lr()
A = {i: False for i in range(N+1)}
for m in range(M):
    a = ir()
    A[a] = True
C = [0 for _ in range(N+1)]
C[0] = 1
for i in range(len(C)):
    if A[i]:
        continue
    if i >= 2:
        C[i] += C[i-2]
        C[i] += C[i-1]
        C[i] %= 1000000007
    elif i >= 1:
        C[i] += C[i-1]
        C[i] %= 1000000007

print((C[N] % 1000000007))
# Original solution
import sys
from collections import deque
from collections import defaultdict
import math
sys.setrecursionlimit(20000000)
input = sys.stdin.readline
n,m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]
a = set(a)
mod = 10**9+7
dp = [0]*(n+5)
dp[0] = 1
for i in range(1,n+1):
        if i in a:
                continue
        if i == 1:
                dp[i] = 1
                continue
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= mod
print((dp[n]%mod))

# Optimized solution
import sys
from collections import deque
from collections import defaultdict
import math
sys.setrecursionlimit(20000000)
input = sys.stdin.readline
n,m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]
a = set(a)
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[i] = 1
                continue
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= mod
print((dp[n]%mod))
# Original solution
import sys
input = sys.stdin.readline #for input speed
sys.setrecursionlimit(10**6) 
N, M = list(map(int, input().split()))
a_list = []
dp = [0]*(N+1)
for _ in range(M):
  a = int(eval(input()))
  a_list.append(a)

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_list:
    dp[i] = 0
print((dp[N]))

# Optimized solution
N, M = list(map(int, input().split()))
a_list = 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_list:
    dp[i] = 0
print((dp[N]))
# Original solution
N, M = list(map(int, input().split()))
A = []
for i in range(M):
    a = int(eval(input()))
    A.append(a)
mod = 10**9 +7
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])%mod
print((dp[-1]))

# Optimized solution
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[:2]= 1, 1 if 1 not in A else 0
for i in range(2, N+1):
    if i not in A:
        dp[i] = (dp[i-1]+dp[i-2])%mod
print((dp[-1]))
# Original solution
MOD = (10**9 + 7)
broken_step = []
     
line = [int(s) for s in input().split()]
     
N, M = line[0], line[1]
     
for i in range(M):
    step_num = int(input().split()[0])
    broken_step.append(step_num)
        
        
dp = [0]*(N+1)
dp[0] = 1
if 1 in broken_step:
    dp[1] = 0
else:
    dp[1] = 1
     
for i in range(2, N+1):
    dp[i] = (dp[i-1]+dp[i-2])%MOD if i not in broken_step else 0
print((dp[N]))

# Optimized solution
MOD = (10**9 + 7)

     
line = [int(s) for s in input().split()]
     
N, M = line[0], line[1]
     
b = [0]*(N+1)
for i in range(M):
    step_num = int(input().split()[0])
    b[step_num] = 1
        
        
dp = [0]*(N+1)
dp[0] = 1
if b[1] == 1:
    dp[1] = 0
else:
    dp[1] = 1
     
for i in range(2, N+1):
    if b[i] == 1:
        dp[i] = 0
    else:
        dp[i] = (dp[i-1]+dp[i-2])%MOD
print((dp[N]))
# Original solution
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush
sys.setrecursionlimit(10**6)
def MAP(): return list(map(int,input().split()))
def INT(): return int(eval(input()))
def FLOAT(): return float(eval(input()))
MOD = 10**9+7

n,m = MAP()
a = [INT() for _ in range(m)]

def fib(n):
    if (n==1) or (n==2):
        return 1
    else:
        return fib(n-1)+fib(n-2)

start = 0
ans = 1

for k in a:
    tmp = k-start
    if tmp==0:
        print((0))
        exit(0)
    ans *= fib(tmp)
    ans%=MOD
    start = k+1

ans*=fib(n-start+1)
ans%=MOD

print(ans)

# Optimized solution
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush
sys.setrecursionlimit(10**6)
def MAP(): return list(map(int,input().split()))
def INT(): return int(eval(input()))
def FLOAT(): return float(eval(input()))
MOD = 10**9+7

n,m = MAP()
a = [INT() for _ in range(m)]

# 高速版
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]]

start = 0
ans = 1

for k in a:
    tmp = k-start
    if tmp==0:
        print((0))
        exit(0)
    ans *= fib(tmp)
    ans%=MOD
    start = k+1

ans*=fib(n-start+1)
ans%=MOD

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

dp = {i:0 for i in A}

dp[0]=1 # 0段目
if 1 in A: # 1段目
  dp[1]=0
else :
  dp[1]=1

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

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

af = [0]*(n+1)
for ai in a:
  af[ai]+=1

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

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

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

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

print((r[n]))

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

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

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

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

lst1 = [int(eval(input())) for i in range(M)]

from functools import lru_cache
@lru_cache(maxsize=None)

def fib(n):
  a, b = 1, 2
  for i in range(1,n+1):  
    if (i == 1):
      if (i in lst1):
        a, b = 0, 1
    else:
      if (i in lst1):
        a, b = 0, a
      else:
        a, b = b, b+a
  return a

print((fib(N)  % 1000000007))

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

if 1 in a:
    dp[1] = 0

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

print((dp[n]))

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

for i in a:
    dp[i] = 0

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

print((dp[n]))
# Original solution
import sys
input = sys.stdin.readline


def typical_stairs():
    n, m = list(map(int, input().split()))
    dangerous = set(int(eval(input())) for _ in range(m))
    mod = 1000000007
    dp = [0] * (n + 1)
    dp[0] = 1
    if 1 not in dangerous:
        dp[1] = 1
    for i in range(2, n + 1):
        if i not in dangerous:
            dp[i] = (dp[i - 2] + dp[i - 1]) % mod
    print((dp[-1]))


if __name__ == '__main__':
    typical_stairs()


# Optimized solution
def typical_stairs():
    n, m, *dangerous = list(map(int, open(0).read().split()))
    dangerous = set(dangerous)
    mod = 1000000007
    dp = [0] * (n + 1)
    dp[0] = 1
    if 1 not in dangerous:
        dp[1] = 1
    for i in range(2, n + 1):
        if i not in dangerous:
            dp[i] = (dp[i - 2] + dp[i - 1]) % mod
    print((dp[-1]))


if __name__ == '__main__':
    typical_stairs()
# 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 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-1] + DP[i-2]
print((DP[N]%(1000000007)))

# 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
if 1 in a:
    DP[1] = 0
else:
    DP[1] = 1
for i in range(len(a)):
    DP[a[i]] = 0
for i in range(2,N+1):
    if DP[i] == -1:
        DP[i] = (DP[i-1] + DP[i-2])%1000000007
print((DP[N]%(1000000007)))
# Original solution
import sys

sys.setrecursionlimit(1000000)

MAX_N = 100010
memo = [-1] * MAX_N

def f(n, a_list):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    elif n == 2:
        for a in a_list:
            if N - a == 1:
                return 1
        return 2
    # すでに探索済みならメモを参照する
    elif memo[n] != -1:
        return memo[n]
    else:
        is_next_damaged = False
        is_2next_damaged = False
        for a in a_list:
            if N - a == n-1:
                is_next_damaged = True
            if N - a == n-2:
                is_2next_damaged = True
        if is_next_damaged == True and is_2next_damaged == False:
            res = f(n-2, a_list)
        if is_next_damaged == False and is_2next_damaged == True:
            res = f(n-1, a_list)
        if is_next_damaged == False and is_2next_damaged == False:
            res = f(n-1, a_list) + f(n-2, a_list)

    # メモ
    memo[n] = res
    return res

if __name__ == '__main__':
    N, M = list(map(int, input().split()))
    a_list = [int(eval(input())) for i in range(M)]

    divided_by = 1000000007

    answer = -1

    # まず移動方法がない場合を考える。
    min_diff = sys.maxsize
    for i in range(1, len(a_list)):
        min_diff = min(min_diff, a_list[i] - a_list[i - 1])

    if min_diff == 1:
        answer = 0
    else:
        # 何らかなの移動方法が必ず存在する場合
        answer = f(N, a_list)%divided_by

    print(answer)


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

   MOD = 1000000007

   dp = [0 for i 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-1 in a) and (i-2 in a):
         dp[i] = 0
      elif i-1 in a:
         dp[i] = dp[i-2] % MOD
      elif i-2 in a:
         dp[i] = dp[i-1] % MOD
      else:
         dp[i] = (dp[i-1] + dp[i-2]) % MOD

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


dp = [0] * (N+1)

for i in range(N+1):
    if i == 0:
        dp[i] = 1
    elif i == 1:
        if i in a:
            dp[i] = 0
            a.remove(i)
        elif i not in a:
            dp[i] = 1
    else:
        if i in a:
            dp[i] = 0
            a.remove(i)
        else:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i] % 1000000007

ans = dp[N]
print(ans)

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


dp = [0] * (N+1)

for i in range(N+1):
    if i == 0:
        dp[i] = 1
    elif i == 1:
        if len(a) !=0:
            if i == a[0]:
                dp[i] = 0
                a.pop(0)

            else:
                dp[i] = 1
        else:
            dp[i] = 1
    else:
        if len(a) !=0:
            if i == a[0]:
                dp[i] = 0
                a.pop(0)

            else:
                dp[i] = dp[i-1] + dp[i-2]
                dp[i] = dp[i] % 1000000007
        else:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] = dp[i] % 1000000007

ans = dp[N]
print(ans)
# Original solution
mod = 10**9+7
import sys
sys.setrecursionlimit(1000000)

N,M = [int(x) for x in input().split()]
a = [int(eval(input())) for _ in range(M)]
di = {}
for i in a:
    di[i] = 1
dp = [0 for _ in range(N+1)]
dp[0] = 1

def dfs(num):
    if(num<0):
        return 0
    if(num==0):
        return 1
    if(num in di):
        return 0
    if(dp[num]==0):
        dp[num] = (dfs(num-1)+dfs(num-2))%mod
    return dp[num]

print((dfs(N)))


# Optimized solution
mod = 10**9+7
import sys
sys.setrecursionlimit(10000000)

N,M = [int(x) for x in input().split()]
a = [int(eval(input())) for _ in range(M)]
di = {}
for i in a:
    di[i]=1
dp = [0 for _ in range(N+1)]
dp[0] = 1
for i in range(N+1):
    if(i in di):
        continue
    if(i<N-1):
        if(i+2 not in di):
            dp[i+2]+=dp[i]
            dp[i+2]%=mod
    if(i<N):
        if(i+1 not in di):
            dp[i+1]+=dp[i]
            dp[i+1]%=mod
print((dp[N]))
# Original solution
import sys
input=sys.stdin.readline
n,m=list(map(int,input().split()))
if m>0:
    a=[int(eval(input())) for i in range(m)]

dp=[0]*(n+1)
dp[0]=1
if m>0:
    if a[0]==1:
        dp[1]=0
    else:
        dp[1]=1
else:
    dp[1]=1

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

print((dp[-1]))

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

dp=[None]*(n+1)
dp[0]=1
for i in range(m):
    dp[a[i]]=0
if dp[1]==None:
    dp[1]=1

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

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

for _ in range(M):
    a = int(eval(input()))
    oks[a] = False

dp = [1] + [0] * N
for now in range(N):
    for nxt in range(now+1, min(N, now+2)+1):
        if oks[nxt]:
            dp[nxt] += dp[now]
            dp[nxt] %= 1e9 + 7

print((int(dp[N])))

# Optimized solution
MOD = 10**9 + 7
N, M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)] + [N + 1]
dp = [0] * (N + 1)
dp[0] = 1
s = -1

for broken in a:
    for j in range(s + 1, broken):
        if j > s + 1:
            dp[j] += dp[j - 1] % MOD
        if j > 1:
            dp[j] += dp[j - 2] % MOD
        dp[j] %= MOD
    s = broken

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


# Optimized solution
n,m=list(map(int,input().split()))
a=[1 for i in range(n+2)]
for i in range(m):
    a[int(eval(input()))]=0
dp=[0 for i in range(n+1)]
dp[0]=1
for i in range(n):
    if ((i+1)<(n+1)) and a[i+1]:
        dp[i+1]=(dp[i+1]+dp[i])%1000000007
    if ((i+2)<(n+1)) and a[i+2]:
        dp[i+2]+=(dp[i+2]+dp[i])%1000000007
print((dp[n]))