CodeEff/ECCO huggingface dataset:
# Original solution
# -*- coding: utf-8 -*-
n,m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]

inf=float("inf")

fib_memo = [-inf for i in range(n+1)]
fib_memo[0] = 1
if 1 in a:
    fib_memo[1]=0
else:
    fib_memo[1]=1

if 1 in [a[i] - a[i-1] for i in range(1,m)]:
    print((0))
    import sys
    sys.exit()
else:
    cur_fib_i = 2
    while cur_fib_i <= n:
        if cur_fib_i in a:
            fib_memo[cur_fib_i]=0
        else:
            fib_memo[cur_fib_i] = fib_memo[cur_fib_i-1] + fib_memo[cur_fib_i-2]
        cur_fib_i += 1
print((fib_memo[n]%1000000007))
#print(fib_memo)


# Optimized solution
# -*- coding: utf-8 -*-
n,m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]

inf=float("inf")

fib_memo = [-inf for i in range(n+1)]
fib_memo[0] = 1
if 1 in a:
    fib_memo[1]=0
else:
    fib_memo[1]=1
for i in a:
    fib_memo[i]=0

if 1 in [a[i] - a[i-1] for i in range(1,m)]:
    print((0))
    import sys
    sys.exit()
else:
    cur_fib_i = 2
    while cur_fib_i <= n:
        if fib_memo[cur_fib_i]==0:
            pass
        else:
            fib_memo[cur_fib_i] = fib_memo[cur_fib_i-1] + fib_memo[cur_fib_i-2]
        cur_fib_i += 1
print((fib_memo[n]%1000000007))
#print(fib_memo)
# Original solution
mod = 1000000007
n,m = list(map(int, input().split(" ")))
a = [int(eval(input())) for i in range(m)]
ans = [0]*(n+1)
ans[0] = 1
for j in range(1,n+1):
  if j in a:
    ans[j] = 0
  else:
    ans[j] = ans[j-1] + ans[j-2]
    ans[j] = ans[j]%mod
print((ans[-1]))
      

# Optimized solution
mod = 1000000007
n,m = list(map(int, input().split(" ")))
a = set([int(eval(input())) for i in range(m)])
ans = [0]*(n+1)
ans[0] = 1
for j in range(1,n+1):
  if j in a:
    ans[j] = 0
  else:
    ans[j] = (ans[j-1] + ans[j-2])%mod
print((ans[-1]))
# Original solution
import math
N,M = list(map(int,input().split()))
a = [-1]
for i in range(M):
    a.append(int(eval(input())))
a.append(N+1)
b = []
c = []
fac_N =[1]
for i in range(M+1):
    b.append(a[i+1]-a[i]-2)
for i in range(1,max(b)+1):
    fac_N.append(fac_N[-1]*i)


for i in range(len(b)):
    counter= 0
    for num2 in range(b[i]//2+1):
        counter += fac_N[num2+(b[i]-2*num2)]//fac_N[num2]//fac_N[b[i]-2*num2]
    c.append(counter)
ans = 1
for i in range(len(c)):
    ans *= c[i]
print((ans%1000000007))


# Optimized solution
import math
N,M = list(map(int,input().split()))
a = [-1]
for i in range(M):
    a.append(int(eval(input())))
a.append(N+1)
b = []
c = []
fac_N =[1]
for i in range(M+1):
    b.append(a[i+1]-a[i]-2)
for i in range(1,max(b)+1):
    fac_N.append(fac_N[-1]*i)


for i in range(len(b)):
    counter= 0
    for num2 in range(b[i]//2+1):
        counter += fac_N[num2+(b[i]-2*num2)]//fac_N[num2]//fac_N[b[i]-2*num2]%1000000007
    c.append(counter)
ans = 1
for i in range(len(c)):
    ans *= c[i]%1000000007
print((ans%1000000007))
# Original solution
import math
N,M = list(map(int,input().split()))
a = [-1]
for i in range(M):
    a.append(int(eval(input())))
a.append(N+1)
b = []
c = []
fac_N =[1]
for i in range(M+1):
    b.append(a[i+1]-a[i]-2)
for i in range(1,max(b)+1):
    fac_N.append(fac_N[-1]*i)
 
 
for i in range(len(b)):
    counter= 0
    for num2 in range(b[i]//2+1):
        bi = b[i]-2*num2
        counter += fac_N[num2+bi]//fac_N[num2]//fac_N[bi]%1000000007
    c.append(counter)
ans = 1
for i in range(len(c)):
    ans *= c[i]%1000000007
print((ans%1000000007))


# Optimized solution
import math
N,M = list(map(int,input().split()))
a = [-1]
for i in range(M):
    a.append(int(eval(input())))
a.append(N+1)
b = []
c = []
fac_N =[1]
ans = 1
for i in range(M+1):
    b.append(a[i+1]-a[i]-2)
for i in range(1,max(b)+1):
    fac_N.append(fac_N[-1]*i)
 
 
for i in range(len(b)):
    counter= 0
    for num2 in range(b[i]//2+1):
        bi = b[i]-2*num2
        counter += fac_N[num2+bi]//fac_N[num2]//fac_N[bi]
    ans*=counter%1000000007
print((ans%1000000007))
# Original solution
import math
N,M = list(map(int,input().split()))
a = [-1]
for i in range(M):
    a.append(int(eval(input())))
a.append(N+1)
b = []
c = []
fac_N =[1]
ans = 1
for i in range(M+1):
    b.append(a[i+1]-a[i]-2)
for i in range(1,max(b)+1):
    fac_N.append(fac_N[-1]*i)
 
 
for i in range(len(b)):
    counter= 0
    for num2 in range(b[i]//2+1):
        bi = b[i]-2*num2
        counter += fac_N[num2+bi]//fac_N[num2]//fac_N[bi]
    ans*=counter%1000000007
print((ans%1000000007))


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

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

a2 = 1
a1 = 0 if 1 in A else 1 
for i in range(2,N+1):
    if i in A:
        a = 0
        a2 = a1
        a1 = a
    else:
        a = a2+a1
        a2 = a1
        a1 = a
print((1 if N == 1 else a%1000000007))
# Original solution
MOD = 10 ** 9 + 7
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
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[N]))

# Optimized solution
MOD = 10 ** 9 + 7
N, M = list(map(int, input().split()))
dp = [[0, 0] for _ in range(N + 1)]
dp[0][0] = 1
for _ in range(M):
    x = int(eval(input()))
    dp[x][1] = 1
for i in range(1, N + 1):
     if dp[i][1] == 0:
         dp[i][0] = (dp[i - 2][0] + dp[i - 1][0]) % MOD
print((dp[N][0]))
# Original solution
n,m=list(map(int,input().split()))
a=[]
for _ in range(m):
    a.append(int(eval(input())))
ans=1
a.sort()
d={0:1,1:1,2:2,3:3,4:5,5:8,6:13,99500:49759705584609,99501:49760296517401}
def func(n):
    if n in d:
        return d[n]
    else:
        v = (func(n-1)+func(n-2))%(10**9+7)
        d[n]=v
        return v
ps=-1
a.append(n+1)
for ai in a:
    c=ai-ps-2
    ps=ai
    if c<0:
        print((0))
        exit()
    c=func(c)
    ans*=c
    ans%=10**9+7

print((ans%(10**9+7)))

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

mod=10**9+7
for i in range(m):
  a=int(eval(input()))
  dp[a-1]=0

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



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

MOD = 10**9+7

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

for i in range(n+1):
    if i == 0 or i == 1:
        if i in a:
            step[i] = 0
    else:
        step[i] = step[i-1] + step[i-2]
        if i in a:
            step[i] = 0
        step[i] %= MOD

print((step[-1]))


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

MOD = 10**9+7

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

for i in range(n+1):
    if a[i] == 1:
        step[i] = 0
    else:
        if i != 0 and i != 1:
            step[i] = (step[i-1] + step[i-2]) % MOD

print((step[-1]))
# Original solution
#4
#1 3 1 1
G, N = [int(_) for _ in input().split(" ")]
ret = ()
for i in range(N):
  ret += (int(eval(input())),)

T = [0]*(G+1)

T[0] = 1
T[1] = 1

if 1 in ret:
  T[1] = 0

for i in range(2, G+1):
	if i in ret:
		T[i] = 0
		continue
	T[i] = (T[i-1] + T[i-2]) % 1000000007

print((T[G]))

# Optimized solution
G, N = [int(_) for _ in input().split(" ")]
ret = ()
T = [-1]*(G+1)
T[0] = 1
T[1] = 1
for i in range(N):
  t = int(eval(input()))
  T[t] = 0

for i in range(2, G+1):
	if T[i] == -1:
		T[i] = (T[i-1] + T[i-2]) % 1000000007

print((T[G]))
# Original solution
# n = int(sys.stdin.readline())
# a, b = map(int, sys.stdin.readline().split())
# c = list(map(int, sys.stdin.readline().split()))
# s = [list(map(int,list(sys.stdin.readline()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# a = 100
# b = 0.987654321
# print('{0:06d}-{1:6f}'.format(a,b))  # 0埋め, 小数点出力桁指定時のときの出力
# 000100-0.987654

import math
import sys
import itertools
import queue

mod = 1000000007

if __name__ == "__main__":
    N, M = list(map(int, sys.stdin.readline().split()))

    broken = [int(sys.stdin.readline()) for _ in range(M)]
    dp = [0 for _ in range(N + 2)]
    dp[N] = 1
    for i in range(0, N)[::-1]:
        if i not in broken:
            dp[i] = dp[i + 1] + dp[i + 2]
    print((dp[0] % mod))

# Optimized solution
# n = int(sys.stdin.readline())
# a, b = map(int, sys.stdin.readline().split())
# c = list(map(int, sys.stdin.readline().split()))
# s = [list(map(int,list(sys.stdin.readline()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき

# a = 100
# b = 0.987654321
# print('{0:06d}-{1:6f}'.format(a,b))  # 0埋め, 小数点出力桁指定時のときの出力
# 000100-0.987654

import math
import sys
import itertools
import queue

mod = 1000000007

if __name__ == "__main__":
    N, M = list(map(int, sys.stdin.readline().split()))

    broken = [False for _ in range(N + 2)]
    for _ in range(M):
        broken[int(sys.stdin.readline())] = True

    dp = [0 for _ in range(N + 2)]
    dp[N] = 1
    for i in range(0, N)[::-1]:
        if not broken[i]:
            dp[i] = dp[i + 1] + dp[i + 2]
    print((dp[0] % mod))
# Original solution
import math
mod = 10**9 + 7
import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline

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

pat = [0 for _ in range(N+1)]
pat[0] = 1
if 1 in a :
    pat[1] = 0
else :
    pat[1] = 1

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

print((pat[N]))


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

pat = [1 for _ in range(N+1)]
for j in a :
    pat[j] = 0

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

print((pat[N]))
# Original solution
import sys
sys.setrecursionlimit(10**6)
N,M = list(map(int,input().split()))
A = []
MOD = 10**9+7
memo = {}
for _ in range(M):
  A.append(int(eval(input())))
def step(cur):
  if cur in memo:
    return memo[cur]
  if cur == N:
    memo[cur] = 1
    return memo[cur]
  if cur > N or cur in A:
    memo[cur] = 0
    return memo[cur]

  memo[cur] = (step(cur+1) + step(cur+2))%MOD
  return memo[cur]

print((step(0)%MOD))


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

if dp[2] != -1:
  dp[2] = 1
for i in range(N+1):
  if dp[i] == -1: continue
  if i-1>=0 and dp[i-1] != -1:
    dp[i] += dp[i-1]
  if i-2>=0 and dp[i-2] != -1:
    dp[i] += dp[i-2]
  dp[i] %= MOD

print((dp[N]))
# Original solution
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

N,M = inpl()

alist = list()
for _ in range(M):
    alist.append(int(eval(input())))

dp = [0]*(N+1)
dp[0] = 1
if 1 not in alist:
    dp[1] = 1
for i in range(2,N+1):
    if i <= N and i not in alist:
        dp[i] += dp[i-1] + dp[i-2]

print((dp[N]%1000000007))


# Optimized solution
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

N,M = inpl()

alist = [False for _ in range(N+1)]
for _ in range(M):
    alist[int(eval(input()))] = True

dp = [0 for _ in range(N+1)]
dp[0] = 1
if not alist[1]:
    dp[1] = 1
for i in range(2,N+1):
    if alist[i]:
        continue
    dp[i] += dp[i-1] + dp[i-2]

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

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

# DP
dp = [0] * (N + 1)
dp[0] = 1
dp[1] = 1 if 1 not in AL else 0
divisor = 10 ** 9 + 7

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

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

# DP
dp = [1] * (N + 1)
for A in AL:
    dp[A] = 0

for i in range(2, N + 1):
    if dp[i] == 1:
        dp[i] = (dp[i-1] + dp[i-2]) % (10**9 + 7)
print((dp[N]))
# Original solution
from sys import stdin
N, M = [int(_) for _ in stdin.readline().rstrip().split()]
A = [int(stdin.readline().rstrip()) for _ in range(M)]

def solve(n):
    dp = []
    for i in range(n+1):
        if i in A:
            dp.append(0)
        else:
            dp.append(1)
    for i in range(2, n+1):
        if dp[i] == 0:
            continue
        dp[i] = dp[i-1]+dp[i-2]
    return dp[n] % 1000000007

print((solve(N)))


# Optimized solution
from sys import stdin
N, M = [int(_) for _ in stdin.readline().rstrip().split()]
dp = [1 for i in range(N+1)]
MOD = 1000000007
for _ in range(M):
  a = int(stdin.readline().rstrip())
  dp[a] = 0
for i in range(2, N+1):
    if dp[i] == 0:
        continue
    dp[i] = dp[i-1]+dp[i-2]
print((dp[N] % MOD))
# Original solution
N, M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
a.sort()
a.append(10 ** 9 + 7)
a.append(10 ** 9 + 7)

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

idx = 0
for pos in range(1, N + 1):
    if a[idx] == pos:
        memo[pos] = 0
        for i in range(idx, N):
            if a[i] > pos: break
        idx = i
        continue
    else:
        if pos > a[idx]:
            for i in range(idx, N):
                if a[i] > pos: break
            idx = i
        #
        if pos == 1:
            memo[1] = (memo[0]) % (10 ** 9 + 7)
        else:
            memo[pos] = (memo[pos - 2] + memo[pos - 1]) % (10 ** 9 + 7)

# print("#", memo)
print((memo[-1]))

# Optimized solution
# -*- coding: utf-8 -*-
MOD = 1000000007
N, M = list(map(int, input().split()))
a = []
for _ in range(M):
    a.append(int(eval(input())))


def getPatternNum(num):
    pattern = [0] * (num + 2)
    pattern[0] = 0
    for i in range(1, num + 2):
        if i == 0 or i == 1:
            pattern[i] = 1
            continue
        pattern[i] = (pattern[i - 2] + pattern[i - 1]) % MOD
    return pattern

def solve():
    # 階段の連続してる数のリスト
    stepsList = [0] * (M + 1)
    maxSteps = 0
    if M > 0:
        stepsList[0] = a[0]
        for j in range(1, M):
            stepsList[j] = a[j] - a[j - 1] - 1
            if stepsList[j] == 0:
                return 0
        stepsList[M] = N - a[M - 1]
    else:
        stepsList = [N + 1]
    pattern = getPatternNum(max(stepsList) + 1)
    # こわれてるところ以外のパターンを掛ける
    # print("#", pattern)
    for k in range(len(stepsList)):
        if k == 0:
            total = pattern[stepsList[k]]
        else:
            total = (total * pattern[stepsList[k]]) % MOD
        # print("##", k, stepsList[k], pattern[stepsList[k]], total)

    return total


ans = solve()
print(ans)
# Original solution
n,_,*a=list(map(int,open(0).read().split()))
c,d=1,0
for i in range(n):n=(c+d)%(10**9+7)*(not-~i in set(a));c,d=n,c
print(n)

# Optimized solution
n,_,*a=list(map(int,open(0).read().split()))
a=set(a)
c,d=1,0
for i in range(n):n=(c+d)%(10**9+7)*(not-~i in a);c,d=n,c
print(n)
# Original solution
#  --*-coding:utf-8-*--

MOD =  1000000007

def f(N, A):
    A.append(-1)

    a = A.pop(0)

    c0 = 0
    c1 = 1

    for i in range(1, N+1):
        c0, c1 = c1, (c0+c1)%MOD

        if i == a:
            c1 = 0
            a = A.pop(0)

    return c1
            


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

    print((f(N, A)))


if __name__ == '__main__':
    main()


# Optimized solution
#  --*-coding:utf-8-*--

MOD =  1000000007

def f(N, A):
    c0 = 0
    c1 = 1

    for i in range(1, N+1):
        c0, c1 = c1, (c0+c1)%MOD

        if i in A:
            c1 = 0

    return c1
            


def main():
    N,M = list(map(int, input().split()))
    A = set(int(eval(input())) for i in range(M))
    print((f(N, A)))


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

DP = [0] * (n + 1)
DP[0] = 1
for i in range(n):
    if i + 1 not in A:
        DP[i + 1] += DP[i]
    if i + 2 not in A and i + 2 <= n:
        DP[i + 2] += DP[i]

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

# Optimized solution
n, m = list(map(int, input().split()))
denger = [False] * (n + 1)
for i in range(m):
    denger[int(eval(input()))] = True

DP = [0] * (n + 1)
DP[0] = 1
for i in range(n):
    if not denger[i + 1]:
        DP[i + 1] += DP[i]
    if i + 2 <= n and not denger[i + 2]:
        DP[i + 2] += DP[i]

print((DP[-1] % 1000000007))
# Original solution
N,M = list(map(int,input().split()))
mod=10**9+7
A=[]
for i in range(M):
  A +=[int(eval(input()))]

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

# Optimized solution
N,M = list(map(int,input().split()))
mod=10**9+7
A = {int(eval(input())) for i in range(M)}

if 1 in A:
  x=0
else:
  x=1
B=[1,x]
for i in range(2,N+1):
  if i in A:
    B +=[0]
  else:
    B +=[(B[i-1]+B[i-2])%mod]
print((B[-1]%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
dp[1] = 1
for i in a:
    dp[i] = 0
for i in range(2, n+1):
    if i not in a:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007
print((dp[n]))

# Optimized solution
n, m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]
dp = [float('inf')] * (n+1)
dp[0] = 1
dp[1] = 1
for i in a:
    dp[i] = 0
for i in range(2, n+1):
    dp[i] = min(dp[i], (dp[i-1] + dp[i-2]) % 1000000007)
print((dp[n]))
# Original solution
#!/usr/bin/env python
import sys
N, M = list(map(int, input().split()))
A = [int(eval(input())) for i in range(M)]
m = 10**9+7
def Fib(n):
    a, b = 0, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b

for i, a in enumerate(A[:-1]):
    if a+1 == A[i+1]:
        print((0))
        sys.exit()
ans = 1
s = 0
for i in range(N):
    if i in A:
        ans *= Fib(i-s+1)
        ans %= m
        s = i+1
ans *= Fib(N-s+2)
ans %= m 
print(ans)

# Optimized solution
#!/usr/bin/env python
N, M = list(map(int, input().split()))
m = 10**9+7
F = [0]*N
for _ in range(M):
    F[int(eval(input()))-1] = 1

a, b = 0, 1
for n in range(N):
    if F[n]:
        a, b = b, 0
    else:
        a, b = b, (a+b) % m
print(b)
# Original solution
n,m=list(map(int,input().split()))
mod=10**9+7
a=[]
for i in range(m):
    a.append(int(eval(input())))
aa=set(a)
l=[0 for i in range(n+1)]
l[0]=1

for i in range(n):
    if i+1 not in aa:
        l[i+1]+=l[i]
        l[i+1]=l[i+1]%mod
    if i+2 not in aa and i+2<n+1:
        l[i+2]+=l[i]
        l[i+2]=l[i+2]%mod

print((l[n]))


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

arr.append(10**10)

dp = [0 for i in range(N+1)]
dp[0] = 1

tmp = 0

if arr[0] == 1:
    dp[1] = 0
    tmp += 1
else:
    dp[1] = 1

for i in range(N-1):
    if arr[tmp] == i+2:
        dp[i+2] = 0
        tmp += 1
        continue
    dp[i+2] = dp[i+1] + dp[i]

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

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

arr.append(10**10)

dp = [0 for i in range(N+1)]
dp[0] = 1

tmp = 0

if arr[0] == 1:
    dp[1] = 0
    tmp += 1
else:
    dp[1] = 1

for i in range(N-1):
    if arr[tmp] == i+2:
        dp[i+2] = 0
        tmp += 1
        continue
    dp[i+2] = (dp[i+1] + dp[i]) % MOD

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

MOD = 1000000007

# DPテーブル
dp = [0]*(N+1)
dp[0] = 1
if 1 not in A:  # 1段目が壊れている場合もあるので注意
    dp[1] = 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[-1]))

# Optimized solution
N, M = list(map(int, input().split()))
BrokenSteps = [int(eval(input())) for _ in range(M)]
 
MOD = 1000000007
 
# DPテーブル
dp = [0]*(N+1)
dp[0] = 1
if 1 not in BrokenSteps:  # 1段目が壊れている場合もあるので注意
    dp[1] = 1

steps = list(range(2, N+1))  # 0,1段目は計算済みなので2段目以降
NoBrokenSteps = list(set(steps) - set(BrokenSteps))
    
for i in NoBrokenSteps:
    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
        
print((dp[-1]))
# 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 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]))


# 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

MOD =  1000000007

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

a_list = set()
for _ in range(M):
	a_list.add(int(eval(input())))

#print(a_list)

counts = [0] * (N + 3)
counts[0] = 1
for i in range(N):
	if not i in a_list:
		counts[i + 1] = (counts[i + 1] + counts[i]) % MOD
		counts[i + 2] = (counts[i + 2] + counts[i]) % MOD

#print(counts)
print((counts[N]))


# Optimized solution

MOD =  1000000007

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

a_list = set()
for _ in range(M):
	a_list.add(int(eval(input())))

#print(a_list)

counts = [0] * (N + 10)
counts[0] = 1
for i in range(N):
	if not i in a_list:
		counts[i + 1] = (counts[i + 1] + counts[i]) % MOD
		counts[i + 2] = (counts[i + 2] + counts[i]) % MOD

#print(counts)
print((counts[N]))
# Original solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for _ in range(m)]
l=[1]+[0 for _ in range(n+5)]

for x in range(n):
    if not x in a:
        l[x+1]+=l[x]
        l[x+2]+=l[x]
print((l[n]%(10**9+7)))

# Optimized solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for _ in range(m)]
l=[1]+[0 for _ in range(n+5)]
if m==0:a=[200000]
for x in range(n):
    if x<a[0]:
        l[x+1]+=l[x]
        l[x+2]+=l[x]
    if x==a[0]:
        if len(a)>=2:a.pop(0)
        else:a[0]=200000
print((l[n]%(10**9+7)))
# Original solution
n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
dp = [0] * (n + 1)
dp[0] = 1 if 0 not in a else 0
dp[1] = 1 if 1 not in a else 0
for i in range(2, n + 1):
    if i in a:
        dp[i] = 0
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % 1000000007
print((dp[n]))


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