CodeEff/ECCO huggingface dataset:
# Original solution
N, M = list(map(int, input().split()))
broken = []
for i in range(M):
  broken.append(int(eval(input())))
a1, a2, a3 = 1, 0, 0
for i in range(1, N+1):
  a3 = a2
  a2 = a1
  if i in broken:
    a1 = 0
  else:
    a1 = (a2 + a3) % 1000000007
print(a1)

# Optimized solution
N, M = list(map(int, input().split()))
m = 0
if M > 0:
  broken = int(eval(input()))
else:
  broken = 0
a1, a2, a3 = 1, 0, 0
for i in range(1, N+1):
  a3, a2 = a2, a1
  if i == broken:
    a1 = 0
    m += 1
    if m < M:
      broken = int(eval(input()))
  else:
    a1 = (a2 + a3) % 1000000007
print(a1)
# Original solution
n,m = list(map(int,input().split()))
a = [int(eval(input())) for _ in range(m)]
step = [0] * (n+1)
step[0] = 1
if 1 not in a:
    step[1] = 1
else:
    step[1] = 0
for i in range(2,n+1):
    if i in a:
        continue
    step[i] = step[i-1] + step[i-2]
step[-1] %= 1000000007
print((step[-1]))

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

res = 1
for i in range(1, len(a)):
    if a[i] == 1:
        continue
    tmp = a[i] - a[i-1] - 2
    if tmp < 0:
        tmp2 = 0
    elif tmp <= 1:
        tmp2 = 1
    elif tmp <= 2:
        tmp2 = 2
    else:
        p, q = 2, 1
        for j in range(1, tmp-1):
            p, q = p+q, p
        tmp2 = p
    res *= tmp2
    res %= 1000000007

print(res)


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

res = 1
for i in range(1, len(a)):
    steps = a[i] - a[i-1] - 2
    if steps < 0:
        patern_nmu = 0
    elif steps <= 1:
        patern_nmu = 1
    elif steps <= 2:
        patern_nmu = 2
    else:
        p, q = 2, 1
        for j in range(1, steps-1):
            p, q = p+q, p
        patern_nmu = p
    res *= patern_nmu
    res %= 1000000007

print(res)
# Original solution
N, M = list(map(int, input().split()))

if M == 0:
    alist = set()
else:
    alist = set(int(eval(input())) for _ in range(M))

dp = [0] * (N + 1)
dp[0] = 1
dp[1] = 1 if 1 not in alist else 0

MOD = 10**9 + 7
for i in range(2, N + 1):
    if i in alist:
        continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD

print((dp[N]))


# Optimized solution
import sys

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

if M == 0:
    alist = set()
else:
    # Input below rows
    alist = set(map(int, sys.stdin))

dp = [0] * (N + 1)
dp[0] = 1
dp[1] = 1 if 1 not in alist else 0

MOD = 10**9 + 7
for i in range(2, N + 1):
    if i in alist:
        continue
    dp[i] = (dp[i - 1] + dp[i - 2]) % MOD

print((dp[N]))
# Original solution
n, m = list(map(int, input().split()))
broken = [False] * (n + 1)
for _ in range(m):
    broken[int(eval(input()))] = True

dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1 if not broken[1] else 0
MOD = 10 ** 9 + 7

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

print((dp[n]))


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

dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1 if not broken[1] else 0
MOD = 10 ** 9 + 7

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

print((dp[n]))
# Original solution
# input here
_INPUT = """\
10 2
4
5
"""
"""
K = int(input())
H, W, K = map(int, input().split())
a = list(map(int, input().split()))
xy = [list(map(int, input().split())) for i in range(N)]
p = tuple(map(int,input().split()))
"""
def main():
    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
    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] %= (10**9+7)

    print((dp[N])) 




            
if __name__ == '__main__':
    import io
    import sys
    import math
    import itertools
    from collections import deque

    # sys.stdin = io.StringIO(_INPUT)
    main()

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

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] %= INF

print((dp[N]))
# Original solution
MOD = 10**9 + 7

N, M = [int(i) for i in input().strip().split()]
dirty_step_idxs = [0] * M
for i in range(M):
  dirty_step_idx = int(eval(input()))
  dirty_step_idxs[i] = dirty_step_idx

def fibonacci(n):
  # 0, 1, 1, 2, 3, 5, 8, ...
  a, b = 0, 1
  for i in range(n-1):
    a, b = b, a + b
  return a
  
if M == 0:
  res = fibonacci(N + 2)
else:
  res = 1
  now_step_idx = 0
  for i in range(M):
    n_step = dirty_step_idxs[i] - now_step_idx - 1
    if n_step == -1:
      res = 0
      break
    res *= fibonacci(n_step + 2)
    now_step_idx = dirty_step_idxs[i] + 1
  rest_steps = N - now_step_idx
  res *= fibonacci(rest_steps + 2) 
    
print((res % MOD))


# Optimized solution
import sys

input = sys.stdin.readline

P = 10 ** 9 + 7


def main():
    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))
            exit()

    broken = [False] * (N + 1)
    for a in A:
        broken[a] = True

    dp = [0] * (N + 1)
    dp[0] = 1
    dp[1] = 1 if not broken[1] else 0

    for i in range(2, N + 1):
        if broken[i]:
            dp[i] = 0
        else:
            dp[i] = (dp[i - 1] + dp[i - 2]) % P
    
    ans = dp[N]
    print(ans)


if __name__ == "__main__":
    main()
# Original solution
n,m,*a=list(map(int,open(0).read().split()))
a=set(a)
dp=[0]*(n+2)
dp[0]=1
div=1000000007
for i in range(n):
  dp[i]%=div
  if i+1 in a:
    dp[i+1]=0
  else:
    dp[i+1]+=dp[i]
  if i+2 in a:
    dp[i+2]=0
  else:
    dp[i+2]+=dp[i]
print((dp[n]%div))

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

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

broken = set([int(readline()) for i in range(M)])

dp = [0] * (N + 1)
dp[0] = 1
if 1 not in broken:
  dp[1] = 1
  
DIV = 10 ** 9 + 7

for i in range(2, N + 1):
  if i in broken:
    continue
  dp[i] = dp[i - 2] + dp[i - 1]
  dp[i] %= DIV
  
print((dp[N]))
# Original solution
n, m = list(map(int, input().split(' ')))
aaa = []
for i in range(m):
    aaa.append(int(eval(input())))

dp = [1] * (n + 3)
for i in range(1, n+1):
    dp[i]  = dp[i-1] if i not in aaa else 0
    dp[i] += dp[i-2] if i >= 2 and i not in aaa else 0
    dp[i] = dp[i] % int(1e9 + 7)
print((dp[n]))

# Optimized solution
n, m = list(map(int, input().split(' ')))
aaa = [0] * (n + 3)
for i in range(m):
    aaa[int(eval(input()))] = True

dp = [1] * (n + 3)
for i in range(1, n+1):  # 1e5
    if not aaa[i]:
        dp[i]  = dp[i-1]
        if i >= 2:
            dp[i] += dp[i-2]
        dp[i] = dp[i] % int(1e9 + 7)
    else:
        dp[i] = 0
print((dp[n]))
# Original solution
n,m,*a=list(map(int,open(0).read().split()))
dp=[-1]*(n+1)
for i in a:
    dp[i]=0
dp[0]=1 
for i in range(1,n+1):
    if dp[i]!=0:
        dp[i]=dp[i-1]+dp[i-2]*(i>1)
print((dp[-1]%(10**9+7)))

# Optimized solution
n,m,*a=list(map(int,open(0).read().split()))
d=[1]*(n+1)
for i in a:
    d[i]=0
for i in range(2,n+1):
    if d[i]!=0:
        d[i]=d[i-1]+d[i-2]
print((d[-1]%(10**9+7)))
# Original solution
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return eval(input())

def main():
  n,m=LI()
  l=[I() for _ in range(m)]

  dp=[0 for _ in range(n+1)]
  dp[0]=1
  for i in range(n):
    for j in range(1,3):
      if i+j<=n and i not in l:
        dp[i+j]+=dp[i]

  # print(dp)
  return dp[n]%mod

# main()
print((main()))


# Optimized solution
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return eval(input())

def main():
  n,m=LI()
  l=[True for _ in range(n+1)]
  for _ in range(m):
    l[I()]=False

  dp=[0 for _ in range(n+1)]
  dp[0]=1
  for i in range(n):
    for j in range(1,3):
      if i+j<=n and l[i]:
        dp[i+j]+=dp[i]

  # print(dp)
  return dp[n]%mod

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

dp = [0 for _ in range(N+1)]
P = 10**9 + 7

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


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

dp = [0 for _ in range(N+1)]
P = 10**9 + 7

dp[0] = 1
for i in range(1, N+1):
    if i in A:
        dp[i] = 0
    elif i == 1:
        dp[i] = dp[i-1] % P
    else:
        dp[i] = (dp[i-1] + dp[i-2]) % P
print((dp[-1]))
# Original solution
import math
import sys

n, m = list(map(int, input().split()))
a_list = [None] * (m + 2)
a_list[0] = -1
for i in range(m):
    a_list[i+1] = int(eval(input()))
a_list[-1] = n + 1

fact_memo = dict()
def fact(n):
    if n in list(fact_memo.keys()):
        return fact_memo[n]
    f = math.factorial(n)
    fact_memo[n] = f
    return f

memo = dict()
ans = 1
cur = a_list[0]
for a in a_list[1:]:
    sub = a - cur - 2
    cur = a
    if sub <= 1:
        if sub == -1:
            print((0))
            sys.exit()
        continue
    if sub in list(memo.keys()):
        ans *= memo[sub]
        continue
    count = sum(fact(sub - j) // fact(j) // fact(sub - j*2) for j in range(sub // 2 + 1))
    memo[sub] = count
    ans *= count
print((ans % 1000000007))


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

N, M = list(map(int, readline().split()))
ans = [0] * (N + 2)
ans[0] = 1
for _ in range(M):
    a = int(readline())
    ans[a] = -1

for i in range(1, N + 1):
    if ans[i] == -1:
        continue
    a1 = max(ans[i - 2], 0)
    a2 = max(ans[i - 1], 0)
    ans[i] = a1 + a2

print((ans[N] % (10 ** 9 + 7)))
# Original solution
def resolve():
    # 整数 1 つ
    #n, m = int(input())
    # 整数複数個
    n, m = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    A = [int(eval(input())) for i in range(m)]
    # 整数 N 個 (スペース区切り)
    #A = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    Route = [0] * (n+1)
    Route[0] = 1
    for i in range(n):
        if i+1 not in A:
            Route[i+1] = (Route[i] + Route[i+1]) % (10**9 + 7)
            #Route[i+1] %= 10**9 + 7
        if i+2 not in A and i+2 <= n:
            Route[i+2] = (Route[i] + Route[i+2]) % (10**9 + 7)
            #Route[i+2] %= 10**9 + 7

    print((Route[n]))
resolve()

# 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
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    #n, m = int(input())
    # 整数複数個
    n, m = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    A = [int(eval(input())) for i in range(m)]
    # 整数 N 個 (スペース区切り)
    #A = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    Route = [0] * (n+1)
    Route[0] = 1
    if 1 not in A:
        Route[1] = 1
    MOD = 10**9 + 7
    for i in range(2, n+1):
        if i not in A:
            Route[i] = (Route[i-1] + Route[i-2]) % MOD
#            Route[i] %= MOD

    print((Route[n]))
#    print(Route)
resolve()

# Optimized solution
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    #n, m = int(input())
    # 整数複数個
    n, m = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    A = [int(eval(input())) for i in range(m)]
    # 整数 N 個 (スペース区切り)
    #A = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    Route = [0] * (n+1)
    Route[0] = 1
    MOD = 10**9 + 7

    is_safe = [True] * (n+1)
    for a in A:
        is_safe[a] = False

    if is_safe[1] == True:
       Route[1] = 1

    for i in range(2, n+1):
        if is_safe[i] == True:
            Route[i] = (Route[i-1] + Route[i-2]) % MOD
#            Route[i] %= MOD

    print((Route[n]))
#    print(Route)
resolve()
# Original solution
n,m=list(map(int,input().split()))
dp=[0]*(n+1)
f=[]
dp[0]=1

for i in range(m):
    t=int(eval(input()))
    f.append(t)

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

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

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

f=[True]*(n+1)
for _ in range(m):
    f[int(eval(input()))]=False

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

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


DP=[1]*(N+1)

if 1 in a:
    DP[1]=0

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

print((DP[N]))


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

a=[]
for i in range(M):
    a.append(int(eval(input())))
a.sort(reverse=True)

DP=[1]*(N+1)

if len(a)>0 and 1==a[-1]:
    DP[1]=0
    a.pop()


for i in range(2,N+1):
    if len(a)>0 and i==a[-1]:
        DP[i]=0
        a.pop()
        if DP[i-1]==0:
            print((0))
            exit()
    else:
        DP[i]=DP[i-1]+DP[i-2]
        DP[i]=DP[i]%mod

print((DP[N]))
# Original solution
n,m=list(map(int,input().split()))
A=[int(eval(input())) for _ in range(m)]
dp=[1]+[0]*(n+1)
for i in range(n):
    if i in A:
        continue
    dp[i+1] += dp[i]
    dp[i+2] += dp[i]
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]+[0]*(n+1)
for i in range(n):
    if i in A:
        continue
    dp[i+1] += dp[i]
    dp[i+2] += dp[i]
print((dp[n]%(10**9 + 7)))
# Original solution
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
p = 10**9 + 7

n, m = list(map(int, input().split()))
A = list(int(eval(input())) for i in range(m))
isHole = [False]*(n+1)


dp = [1]*(n+1)

for a in A:
    isHole[a] = True
    dp[a] = 0


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

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

# Optimized solution
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline
p=10**9+7
n, m = list(map(int, input().split()))
a = list(int(eval(input())) for i in range(m))

safe = [1]*(n+1)
for aa in a:
    safe[aa]=0

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

if safe[1]:dp[1]=1

for i in range(2,n+1):
    if not safe[i]:
        continue

    dp[i] = dp[i-1]%p+dp[i-2]%p

print((dp[-1]%p))
# Original solution
N, M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
D = 1000000007
dp = [1]*(N+1)
for i in a:
    dp[i] = 0
for i in range(2, len(dp)):
    if i in a:
        continue
    dp[i] = dp[i-1] + dp[i-2]
print((dp[-1]%D))

# Optimized solution
N, M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
D = 1000000007
dp = [1]*(N+1)
for i in a:
    dp[i] = 0
for i in range(2, len(dp)):
    if dp[i]==0:
        continue
    dp[i] = dp[i-1] + dp[i-2]
print((dp[-1]%D))
# Original solution
N,M = (int(x) for x in input().split())
Broken = [True]*(N+1)
for TM in range(0,M):
    Broken[int(eval(input()))] = False

DP = [1]+[0]*N
for Now in range(0,N):
    for Next in range(Now+1,min(N+1,Now+3)):
        if Broken[Next]==True: DP[Next] += DP[Now]
print((DP[N]%1000000007))

# Optimized solution
N,M = (int(x) for x in input().split())
Broken = [True]*(N+1)
for TM in range(0,M):
    Broken[int(eval(input()))] = False
DP = [1]+[0]*N
for Now in range(0,N):
    for Next in range(Now+1,min(N+1,Now+3)):
        if Broken[Next]==True:
            DP[Next] = (DP[Next]+DP[Now])%1000000007
print((DP[N]))
# Original solution
import math

def routeCombCount(distance):
  comb_count = 1
  max_skippable_count = distance // 2

  if max_skippable_count == 0:
    return 1

  for skippable_count in range(1, max_skippable_count + 1):
    step_count = distance - skippable_count
    comb_count += combinations_count(step_count, skippable_count)

  return comb_count

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

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

count = 1
aim_stage = N
now_stage = 0
before_broken = -1
for i in range(M):
  broken = int(eval(input()))
  if broken == before_broken + 1:
    count = 0
    break

  aim_stage = broken - 1
  distance = aim_stage - now_stage

  count *= routeCombCount(distance)

  before_broken = broken
  now_stage = broken + 1

distance = N - now_stage
count *= routeCombCount(distance)

print((count % 1000000007))

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

halls = {}
for i in range(M):
    index = int(eval(input()))
    halls[index] = True

dp = [1] * (N + 1)

for i in range(1, N + 1):
    if i in halls:
        dp[i] = 0
        continue
    if i == 1:
        continue
    dp[i] = dp[max(0, i - 1)] + dp[max(0, i - 2)]
    
print((dp[N] % 1000000007))
# Original solution
n, m = [int(i) for i in input().split()]
a = []
for i in range(m):
  a.append(int(eval(input())))

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

for i in range(2, n + 1):
  if i in a:
    step.append(0)
  else:
    step.append((step[-1] + step[-2])%1000000007)
    
print((step[-1]))

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

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

a.append(n + 1)
a.insert(0, -1)
b = [i-j-1 for i,j in zip(a[1:], a[:-1])]

mm = max(b) - 1

step = [0,1]

for i in range(mm):
	step.append(step[-1] + step[-2])

mul = 1
for i in b:
	mul *= step[i]
	
print((mul%1000000007))
# Original solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for _ in range(m)]
p,q=0,1
for i in range(n):
    if i+1 in a:p,q=q,0
    else:p,q=q,(p+q)%1000000007
print(q) 

# Optimized solution
n,m=list(map(int,input().split()))
a=[1]*(n+1)
for _ in range(m):a[int(eval(input()))]=0
p,q=0,1
for i in range(1,n+1):
    p,q=q,a[i]*(p+q)%(10**9+7)
print(q)
# Original solution
import sys
#from scipy.special import comb
#from scipy.misc import comb

from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, list(range(n, n - r, -1)))
    under = reduce(mul, list(range(1,r + 1)))
    return over // under

sys.setrecursionlimit(100000)
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]


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

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

A = [0]*M

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

A.append(N+1)

def step_comb(L):
    c = 0
    if L==1 or L == 0:
        c = 1
    else:
        for i in range(L//2 +1):
            j = L - 2*i
            #c += comb(j+i, i, exact=True)
            c += cmb(j+i, i)
    return c

total_comb = 1
NOW = 0
for a in A:
    if NOW == a:
        print((0))
        sys.exit()
    L = a-1-NOW
    total_comb *= step_comb(L)
    NOW = a + 1
    
print((total_comb % 1000000007 ))


# Optimized solution
import sys
sys.setrecursionlimit(100000000)

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

if M == 0:
    A = []
else:
    A = [0]*M
    for i in range(M):
        A[i] = int(eval(input()))

A.append(N+1)

# DP version
DP = [0]*(N+1)
DP[0] = 1
# １段の階段を登るやり方の数
DP[1] = 1
# 2段の階段を登るやり方の数
#DP[2] = 2

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

def step_comb(L):
    if DP[L]>0:
        return DP[L]
    DP[L] = step_comb(L-1) + step_comb(L-2)
    return DP[L]
    
total_comb = 1
NOW = 0
for a in A:
    if NOW == a:
        print((0))
        sys.exit()
    L = a-1-NOW
    total_comb *= step_comb(L)
    NOW = a + 1
    if NOW == N:
        break
    
print((total_comb % 1000000007 ))
# Original solution
import sys
input = sys.stdin.readline
mod=10**9+7
n,m=list(map(int,input().split()))
A=[]
for i in range(m):
  a=int(eval(input()))
  A.append(a)
S=[0]*(n+1)
S[0]=1
if 1 not in A:
  S[1]=1
for i in range(2,n+1):
  if i in A:
    S[i]=0
  else:
    S[i]=(S[i-1]+S[i-2])%mod
print((S[n]%mod))


# Optimized solution
import sys
input = sys.stdin.readline
mod=10**9+7
n,m=list(map(int,input().split()))
A=set()
for i in range(m):
  A.add(int(eval(input())))
S=[0]*(n+1)
S[0]=1
if 1 not in A:
  S[1]=1
for i in range(2,n+1):
  if i in A:
    S[i]=0
  else:
    S[i]=(S[i-1]+S[i-2])%mod
print((S[n]%mod))
# Original solution
import sys
input = sys.stdin.readline
MOD = 10**9 + 7

N, M = list(map(int, input().split()))
broken_floors = [int(eval(input())) for _ in range(M)]
dp = [0]*(N+2)
dp[1] = 1

for i in range(1, N+1):
    if i not in broken_floors:
        dp[i+1] = (dp[i] + dp[i-1]) % MOD

print((dp[-1]))

# Optimized solution
import sys
input = sys.stdin.readline
MOD = 10**9 + 7

N, M = list(map(int, input().split()))
broken_floors = set(int(eval(input())) for _ in range(M))
dp = [0]*(N+2)
dp[1] = 1

for i in range(1, N+1):
    if i not in broken_floors:
        dp[i+1] = (dp[i] + dp[i-1]) % MOD

print((dp[-1]))