CodeEff/ECCO huggingface dataset:
# Original solution
n,m=list(map(int,input().split()))
mod=10**9+7

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

a=[int(eval(input())) for i 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
print((dp[-1]))


# Optimized solution
n,m=list(map(int,input().split()))
mod=10**9+7

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

a=set(int(eval(input())) for i 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
print((dp[-1]))
# Original solution
n,m=list(map(int,input().split()))
mod=10**9+7

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

a=set(int(eval(input())) for i 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
print((dp[-1]))


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

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

for i in range(1,n+1):
    if i in a:
        continue
    if i==1:
        dp[i]=1
    else:
        dp[i]=(dp[i-1]+dp[i-2])%mod
print((dp[-1]))
# Original solution
N,M = list(map(int,input().split(' ')))
l = [int(eval(input())) for i in range(M)]

mod = 10**9+7
dp = {}
for i in range(N+1):
    dp[i] = 1
dp[1] = 0 if 1 in l else 1

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

print((dp[N]%mod))

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

mod = 10**9+7
dp = {}
for i in range(N+1):
    dp[i] = 1
dp[1] = 0 if 1 in l else 1

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

print((dp[N]%mod))
# 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 not in A:
        dp[i] = (dp[i-1] + dp[i-2]) % MOD
print((dp[N]))

# Optimized solution
import sys
sys.setrecursionlimit(10 ** 7)

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

MOD = 10 ** 9 + 7
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N+1):
    if i not in A:
        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 _ in range(m)]

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

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

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

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

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

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

print((result[n]))

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

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

print((result[n]))
# Original solution
import sys, math, collections, heapq, itertools
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    file = sys.stdin.readline #single: int(file()), line: map(int, file().split())
    INF = 10 ** 25
    mod = 7 + 10 ** 9
    N, M = list(map(int, file().split()))
    broken = set()
    for i in range(M): broken |= {int(file())}

    DP = [0] * (N + 1)
    DP[0] = 1
    for i in range(N):
        if i + 1 not in broken: 
            DP[i+1] += DP[i]
            DP[i+1] %= mod
        if i + 2 <= N:
            if i + 2 not in broken:
                DP[i+2] += DP[i]
                DP[i+2] %= mod
    print((DP[N]))
    return 0
  
if __name__ == "__main__":
    solve()

# Optimized solution
import sys

def solve():
    input = sys.stdin.readline
    N, M= list(map(int, input().split()))
    mod = 7 + 10 ** 9
    A = [True] * (N + 1)
    for _ in range(M):
        A[int(eval(input()))] = False
    DP = [0] * (N + 1)
    DP[0] = 1
    for i in range(N):
        if i < N - 1:
            if A[i + 2]: 
                DP[i + 2] += DP[i]
                DP[i + 2] %= mod
        if A[i + 1]:
            DP[i + 1] += DP[i]
            DP[i + 1] %= mod

    print((DP[N]))

    return 0

if __name__ == "__main__":
    solve()
# Original solution
n,m=list(map(int,input().split()))
a=[0]*m
for i in range(m):
    a[i]=int(eval(input()))
p0=1
if 1 in a:
    p1=0
else:
    p1=1
for i in range(2,n+1):
    if i in a:
        p2=0
    else:
        p2=p1+p0
    p0,p1=p1,p2
print((p1%1000000007))


# Optimized solution

n,m=list(map(int,input().split()))
a=[1]*(n+1)
for i in range(m):
    a[int(eval(input()))]=0
p0=a[0]
p1=a[1]
for i in range(2,n+1):
    if a[i]==1:
        p2=p0+p1
    else:
        p2=0
    p0,p1=p1,p2
print((p1%1000000007))
# Original solution
def main():
    import sys
    input = sys.stdin.readline
    N,M = list(map(int,input().split()))
    a = []
    A = [0] * (1 + 10 ** 5)
    for _ in range(M):
        A[int(eval(input()))] = 1
    dp = [0] * (N + 1)
    dp[0] = 1
    if A[1]:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N + 1):
        if A[i]:
            dp[i] = 0
        else:
            dp[i] = dp[i-1] + dp[i-2]
            dp[i] %= 1000000007
    print((dp[N]))
if __name__ == '__main__':
    main()   

# Optimized solution
import sys
input = lambda : sys.stdin.readline().rstrip()
mod = 10**9 + 7

n, m = list(map(int, input().split()))
a = []
for _ in range(m):
    a.append(int(eval(input())))
a = set(a)
dp = [0]*(n + 1)
dp[0] = 1
for i in range(n):
    if i + 2 not in a and i + 2 <= n:
        dp[i + 2] += dp[i]
        dp[i + 2] %= mod
    if i + 1 not in a:
        dp[i + 1] += dp[i]
        dp[i + 1] %= mod
print((dp[-1]))
# Original solution
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def solve():
    n, m = list(map(int, input().split()))
    am = set(int(eval(input())) for i in range(m))
    ans = [0] * (n + 10)
    ans[0] = 1
    md = 10 ** 9 + 7
    for i in range(n):
        if (i + 1) not in am:
            ans[i + 1] += ans[i]
            ans[i + 1] %= md
        if (i + 2) not in am:
            ans[i + 2] += ans[i]
            ans[i + 2] %= md
    print((ans[n]))

if __name__=="__main__":
    solve()


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

def solve():
    n, m = list(map(int, input().split()))
    am = set([int(eval(input())) for i in range(m)])
    ans = [0] * (n + 1000)
    ans[0] = 1
    md = (10 ** 9) + 7
    for i in range(n):
        if (i + 1) not in am:
            ans[i + 1] = (ans[i] + ans[i + 1]) % md
        if (i + 2) not in am:
            ans[i + 2] = (ans[i] + ans[i + 2]) % md
    print((ans[n]))

if __name__ == "__main__":
    solve()
# 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
if not 1 in a:
    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]) % MOD
print((dp[n]))


# 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)
ng = [False]*(n+1)
for i in a:
    ng[i] = True
    
dp[0] = 1
if not ng[1]:
    dp[1] = 1
for i in range(2, n+1):
    if ng[i]:
        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 _ in range(M)]

MOD = 10 ** 9 + 7

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

for n in range(1, N + 1):
	if n in A:
		continue
	dp[n] = (dp[n - 1] + (dp[n - 2] if 2 <= n else 0)) % MOD

#print(dp)
print((dp[N]))


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

MOD = 10 ** 9 + 7

am = {}
for a in A:
	am[a] = True

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

for n in range(1, N + 1):
	if n in am:
		continue
	dp[n] = (dp[n - 1] + (dp[n - 2] if 2 <= n else 0)) % MOD

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

MOD = 10 ** 9 + 7

am = set()
for a in A:
	am |= {a}

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

for n in range(1, N + 1):
	if n in am:
		continue
	dp[n] = (dp[n - 1] + (dp[n - 2] if 2 <= n else 0)) % MOD

#print(dp)
print((dp[N]))


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

MOD = 10 ** 9 + 7

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

for n in range(1, N + 1):
	if n in A:
		continue
	dp[n] = (dp[n - 1] + (dp[n - 2] if 2 <= n else 0)) % MOD

print((dp[N]))
# Original solution
n,m = (int(i) for i in input().split())
a = [int(eval(input())) for i in range(m)]
oks = [True if not i in a else False for i in range(n+1)]
mod = 1000000007
dp = [0 for _ in range(n+1)]
dp[0] = 1
dp[1] = 1 if not 1 in a else 0
for i in range(2,n+1):
    if oks[i] is True:
        dp[i] = (dp[i-1]+dp[i-2])%mod
print((dp[n]))


# Optimized solution
n,m = (int(i) for i in input().split())
a = [int(eval(input())) for i in range(m)]
mod = 1000000007
oks = [True for _ in range(n+1)]
for i in a:
    oks[i] = False
dp = [1,0]
dp[1] = 1 if oks[1] is True else 0
for i in range(2,n+1):
    if oks[i] is True:
        dp.append((dp[i-1]+dp[i-2])%mod)
    else:
        dp.append(0)
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)]

MOD = 10 ** 9 + 7

list = [0] * N

for i in range(N):
    if i == 0:
        if (i + 1) in a:
            list[i] = 0
        else:
            list[i] = 1
    elif i == 1:
        if (i + 1) in a:
            list[i] = 0
        elif i in a:
            list[i] = 1
        else:
            list[i] = 2
    else:
        if (i + 1) in a:
            list[i] = 0
        else:
            list[i] = (list[i - 1] + list[i - 2]) % MOD
            
ans = list[N - 1]
print(ans)

# Optimized solution
import sys
N, M = list(map(int, sys.stdin.readline().split()))
a = [int(sys.stdin.readline()) for _ in range(M)]

MOD = 10 ** 9 + 7

list = [0] * N

if M > 0:
    j = 0
    for i in range(N):
        if i == 0:
            if a[j] == 1:
                list[i] = 0
            else:
                list[i] = 1
        elif i == 1:
            if a[j] == 2:
                list[i] = 0
            elif a[0] == 1:
                list[i] = 1
            else:
                list[i] = 2
        else:
            if a[j] == i + 1:
                list[i] = 0
            else:
                list[i] = (list[i - 1] + list[i - 2]) % MOD
        if i + 1 == a[j] and j < M - 1:
            j += 1

else:
    for i in range(N):
        if i == 0:
            list[i] = 1
        elif i == 1:
            list[i] = 2
        else:
            list[i] = (list[i - 1] + list[i - 2]) % MOD
            
ans = list[N - 1]
print(ans)
# Original solution
N,M = list(map(int,input().split()))
a = [int(eval(input())) for _ in range(M)]

if 1 in a:
  fibs = [1,0]
else:
  fibs = [1,1]

for i in range(2,N+1):
  if i in a:
    fibs[0] = fibs[1]
    fibs[1] = 0
  else:
    next = fibs[1] + fibs[0]
    if next > 1000000007:
      next -= 1000000007
    fibs[0] = fibs[1]
    fibs[1] = next

print((fibs[-1]))

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

if 1 in a:
  a.pop()
  fibs = [1,0]
else:
  fibs = [1,1]

for i in range(2,N+1):
  if len(a) > 0 and i == a[-1]:
    a.pop()
    fibs[0] = fibs[1]
    fibs[1] = 0
  else:
    next = fibs[1] + fibs[0]
    if next > 1000000007:
      next -= 1000000007
    fibs[0] = fibs[1]
    fibs[1] = next

print((fibs[-1]))
# 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)
if n==1:
  print((1))
  exit()
if 1 in a and 2 in a:
  print((0))
  exit()
elif 1 in a:
  dp[1]=0
  dp[2]=1
elif 2 in a:
  dp[1]=1
  dp[2]=0
else:
  dp[1]=1
  dp[2]=2
  
for i in range(3,n+1):
  if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD
print((dp[-1]%MOD))

# Optimized solution
MOD=10**9+7
n,m=list(map(int,input().split()))
a=set([int(eval(input())) for _ in range(m)])
dp=[0]*(n+1)
if n==1:
  print((1))
  exit()
if 1 in a and 2 in a:
  print((0))
  exit()
elif 1 in a:
  dp[1]=0
  dp[2]=1
elif 2 in a:
  dp[1]=1
  dp[2]=0
else:
  dp[1]=1
  dp[2]=2
  
for i in range(3,n+1):
  if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD
print((dp[-1]%MOD))
# Original solution
import sys
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD=10**9+7
n,m=list(map(int,input().split()))
a=set([int(eval(input())) for _ in range(m)])
if n==1:
  print((1))
  exit()
if 1 in a and 2 in a:
  print((0))
  exit()
elif 1 in a:
  ans=[0,0,1]
elif 2 in a:
  ans=[0,1,0]
else:
  ans=[0,1,2]

@lru_cache(maxsize=None)
def cnt(x):
  if x<3:
    return ans[x]
  if x in a:
    return 0
  else:
    return (cnt(x-1)+cnt(x-2))%MOD

print((cnt(n)))

# Optimized solution
MOD=10**9+7
n,m=list(map(int,input().split()))
a=set([int(eval(input())) for _ in range(m)])
if n==1:
  print((1))
  exit()
if 1 in a and 2 in a:
  print((0))
  exit()
elif 1 in a:
  ans=[0,1]
elif 2 in a:
  ans=[1,0]
else:
  ans=[1,2]

for i in range(2,n):
  if i+1 in a:
    ans.append(0)
  else:
    s=(ans[-1]+ans[-2])%MOD
    ans.append(s)
print((ans[-1]%MOD))
# Original solution
import sys
sys.setrecursionlimit(100000)

def intinput(): return list(map(int,sys.stdin.readline().split()))

fib={0:0,1:1,2:1}
for i in range(3,100003):
    fib[i]=fib[i-1]+fib[i-2]
  #  fib.append(fib[i-1]+fib[i-2])

n,m=intinput()
mod=10**9+7
a=[int(sys.stdin.readline()) for _ in range(m)]
if m!=0:
    l=[a[0]]
    for i in range(len(a)-1):
        l.append(a[i+1]-a[i]-1)
    l.append(n-a[-1])
    k=1
    for i in l:
        k=fib[i]*k%mod
    print((k%mod))
else:
    print((fib[n+1]%mod))

# Optimized solution
import sys
sys.setrecursionlimit(100000)

def intinput(): return list(map(int,sys.stdin.readline().split()))


n, m = intinput()
a = {int(sys.stdin.readline()) for _ in range(m)}
memo = [0 for x in range(n + 4)]
memo[0] = 1
mod = 10 ** 9 + 7
for i in range(n):
    if i + 1 not in a:
        memo[i + 1] = (memo[i + 1] + memo[i]) % mod
    if i + 2 not in a:
        memo[i + 2] = (memo[i + 2] + memo[i]) % mod
print((memo[n]))
# Original solution
import sys

def main():
    input = sys.stdin.readline
    MOD = 10**9 + 7
    N, M = list(map(int, input().split()))
    A = [int(eval(input())) for _ in range(M)]

    dp = [0] * (N+2)
    dp[1] = 1
    for i in range(N):
        step = i+2
        if i+1 in A:
            dp[step] = 0
        else:
            dp[step] = dp[step-1] + dp[step-2]
            dp[step] %= MOD

    return dp[N+1]


if __name__ == '__main__':
    print((main()))


# Optimized solution
import sys

def main():
    input = sys.stdin.readline
    MOD = 10**9 + 7
    N, M = list(map(int, input().split()))
    A = [int(eval(input())) for _ in range(M)]
    is_safe = [True] * (N+1)
    for a in A:
        is_safe[a] = False

    dp = [0] * (N+2)
    dp[1] = 1
    for i in range(N):
        step = i+2
        if is_safe[i+1]:
            dp[step] = dp[step-1] + dp[step-2]
            dp[step] %= MOD
        else:
            dp[step] = 0

    return dp[N+1]


if __name__ == '__main__':
    print((main()))
# Original solution
import sys

def main():
    input = sys.stdin.readline
    MOD = 10**9 + 7
    N, M = list(map(int, input().split()))
    A = [int(eval(input())) for _ in range(M)]
    is_safe = [True] * (N+1)
    for a in A:
        is_safe[a] = False

    dp = [0] * (N+2)
    dp[1] = 1
    for i in range(N):
        step = i+2
        if is_safe[i+1]:
            dp[step] = dp[step-1] + dp[step-2]
            dp[step] %= MOD
        else:
            dp[step] = 0

    return dp[N+1]


if __name__ == '__main__':
    print((main()))


# Optimized solution
import sys

def main():
    input = sys.stdin.readline
    MOD = 10**9 + 7
    N, M = list(map(int, input().split()))
    A = [int(eval(input())) for _ in range(M)]
    is_safe = [True] * (N+2)
    for a in A:
        is_safe[a+1] = False

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

    return dp[N+1]


if __name__ == '__main__':
    print((main()))
# Original solution
N, M = tuple(map(int, input().split()))
mod = 10**9+7
broken = []
dp = [0]* (N+1)

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

dp[0] = 1

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

print((dp[N]))

# 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[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

mod=10**9+7
n, m = list(map(int, input().split()))
ai=[]

for i in range(m):
    ai.append(int(eval(input())))
#print(ai)

dp=[]
for i in range(n+1):
    dp.append(0)

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

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

#print(dp)
print((dp[n]))


# Optimized solution

mod=10**9+7
n, m = list(map(int, input().split()))
ai={}

for i in range(m):
    ai.setdefault(int(eval(input())), 0)
#print(ai)

dp={}
for i in range(n+1):
    dp.setdefault(i, 0)

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

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

#print(dp)
print((dp[n]))
# Original solution
import sys
input = sys.stdin.readline
n,m=(int(i) for i in input().split())
a = [int(eval(input())) for i in range(m)]
#print(n,m,a)

d=[0 for i in range(100000+10)]
p=1000000007
#n=100
#a=[1, 23, 45, 67, 89]
aa=[0 for i in range(100000+10)]

for i in range(10**5+10):
    if i in a:
        aa[i]=1
#print(aa)

d[0]=1
if aa[1] == 0:
    d[1]=1
else:
    d[1]=0
    
if aa[2] == 0:
    d[2]=d[1]+d[0]
else:
    d[2]=0
    
for i in range(2,n+1):
    if aa[i] == 0:
        d[i]=d[i-1]+d[i-2]
        d[i]=d[i]%p
    else:
        d[i]=0
#print(d)

print((d[n]%p))



# Optimized solution
import sys
input = sys.stdin.readline
n,m=(int(i) for i in input().split())
a = [int(eval(input())) for i in range(m)]
#print(n,m,a)

d=[0 for i in range(100000+10)]
p=1000000007
#n=100
#a=[1, 23, 45, 67, 89]
aa=[0 for i in range(100000+10)]

for i in a:
    aa[i]=1
#print(aa)

d[0]=1
if aa[1] == 0:
    d[1]=1
else:
    d[1]=0
    
if aa[2] == 0:
    d[2]=d[1]+d[0]
else:
    d[2]=0
    
for i in range(2,n+1):
    if aa[i] == 0:
        d[i]=d[i-1]+d[i-2]
        d[i]=d[i]%p
    else:
        d[i]=0
#print(d)

print((d[n]%p))
# 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)])#setにしないとTLEになる
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]))
# 入力
# 6 1
# 3
# Original solution
N,M=list(map(int, input().split()))

NG=[ 0 for i in range(N+1) ]
for i in range(M):
	a=eval(input())
	NG[a]=1

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

mod=10**9+7

for i in range(N):
	if i+1<=N and NG[i+1]==0:
		dp[i+1]+=dp[i]
		dp[i+1]%=mod
	if  i+2<=N and NG[i+2]==0:
		dp[i+2]+=dp[i]
		dp[i+2]%=mod

print(dp[N]%mod)


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

NG=[ 0 for i in range(N+1) ]
for i in range(M):
	a=int( sys.stdin.readline().strip() )
	NG[a]=1

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

mod=10**9+7

for i in range(N):
	if i+1<=N and NG[i+1]==0:
		dp[i+1]+=dp[i]
		dp[i+1]%=mod
	if  i+2<=N and NG[i+2]==0:
		dp[i+2]+=dp[i]
		dp[i+2]%=mod

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

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

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

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

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

print((dp[n]%mo))

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

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

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

MOD = 1000000007


def main():
    n, m = [int(i) for i in input().split()]
    a = [int(eval(input())) for _ in range(m)]
    steps = [0] * (n + 1)
    steps[0] = 1

    for now in range(n):
        for next_ in range(now + 1, min(now + 2, n) + 1):
            if next_ not in a:
                steps[next_] += steps[now]
                steps[next_] %= MOD
    print((steps[-1]))


if __name__ == '__main__':
    main()


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

MOD = 1000000007


def main():
    n, m = [int(i) for i in input().split()]
    a = {int(eval(input())) for _ in range(m)}
    steps = [0] * (n + 1)
    steps[0] = 1

    for now in range(n):
        for next_ in range(now + 1, min(now + 2, n) + 1):
            if next_ not in a:
                steps[next_] += steps[now] % MOD
                steps[next_] %= MOD
    print((steps[-1]))


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

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

print((fibo[-1]))

# Optimized solution
import sys
mod = 10**9+7

def main():
    n, m = list(map(int, input().split(' ')))
    if m > 0:
        aaa = set(map(int, sys.stdin))
    else:
        aaa = set()
 
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1 if 1 not in aaa else 0
    
    for i in range(2, n+1):
        if i in aaa:
            continue
        dp[i] = (dp[i-1]+dp[i-2])%mod
 
    print((dp[n]))
 
main()