CodeEff/ECCO huggingface dataset:
# Original solution
#N = int(input())
N, M =  list(map(int,input().split()))
#W =list(map(int,input().split()))
a = [(int(eval(input()))) for i in range(M)]

import sys

sys.setrecursionlimit(100000)
memo  =[-1]*(N+2)
def stair_count(n):
    if memo[n]!= -1:
        return memo[n]
    if n==0 or n==1:
        memo[n] =1
        return memo[n]
    memo[n] = stair_count(n-1) + stair_count(n-2)
    return memo[n]

start = 0
answer = 1
for i in a:
        if i == start:
            print((0))
            exit()
        else:
            n = i-1-start
            answer = (answer * stair_count(n))
            start = i+1
n = N -start
answer = (answer * stair_count(n))
print((answer%1000000007))


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

import sys
sys.setrecursionlimit(100000)

memo  =[-1]*(N+2)
memo[0] = 1
memo[1] = 1
def stair_count(n):
    for j in range(2,n+1):
        memo[j] = memo[j-1] + memo[j-2]

start = 0
answer = 1
dif = []
for i in a:
    if i == start:
        print((0))
        exit()
    else:
        n = i-1-start
        dif.append(n)
        start = i+1
dif.append(N-start)
stair_count(max(dif))
for i in dif:
        answer = (answer * memo[i])

print((answer%1000000007))
# Original solution
N, M = list(map(int, input().split()))
a = list(int(eval(input())) for i in range(M))
DP = [0]*(N+1)

for i in range(N+1):
    if i in a:
        DP[i] = 0
    elif i == 0 or i == 1:
        DP[i] = 1
    else:
        DP[i] = (DP[i-1]+DP[i-2])
print((DP[-1]%1000000007))

# Optimized solution
N, M = list(map(int, input().split()))
a = list(int(eval(input())) for i in range(M))
DP = [0]*(N+1)
pointer = 0
for i in range(N+1):
    if pointer < M:
        if i == a[pointer]:
          DP[i] = 0
          pointer += 1
          continue
    if i == 0 or i == 1:
        DP[i] = 1
    else:
        DP[i] = (DP[i-1]+DP[i-2])
print((DP[-1]%1000000007))
# Original solution
n, m = list(map(int,input().split()))
a = [int(eval(input())) for i in range(m)]
p = [0 for i in range(n+1)]
for i in range(1,n+1):
    if i in a:
        p[i] = 0
    elif i == 1:
        p[i] = 1
    elif i == 2:
        p[i] = p[1] + 1
    else:
        p[i] = p[i-1] + p[i-2]
print((p[n] % (10**9 + 7)))

# Optimized solution
n, m = list(map(int,input().split()))
p = [0 for i in range(n+1)]
a = [0 for i in range(n+1)]
for i in range(m):
    a[int(eval(input()))] = 1
for i in range(1,n+1):
    if a[i] == 1:
        p[i] = 0
    elif i == 1:
        p[i] = 1
    elif i == 2:
        p[i] = p[1] + 1
    else:
        p[i] = p[i-1] + p[i-2]
print((p[n] % (10**9 + 7)))
# Original solution
def resolve():
    import sys
    
    read = sys.stdin.read
    readline = sys.stdin.readline

    N, M = list(map(int, readline().split()))
    a = [int(x) for x in read().split()]
    
    dp = [0] * (N + 2)
    dp[0] = 1
    
    for i in range(N):
        one = i + 1
        two = i + 2
        now = dp[i]
        if one not in a:
            dp[one] += now
        if two not in a:
            dp[two] += now
    print((dp[N] % 1_000_000_007))


resolve()


# Optimized solution
def resolve():
    import sys
    
    read = sys.stdin.read
    readline = sys.stdin.readline

    N, M = list(map(int, readline().split()))
    a = set(int(x) for x in read().split())
    
    dp = [0] * (N + 2)
    dp[0] = 1

    for i in range(N):
        now = dp[i]
        if i + 1 not in a:
            dp[i + 1] += now
        if i + 2 not in a:
            dp[i + 2] += now

    print((dp[N] % 1_000_000_007))


resolve()
# Original solution
import sys
N,M=list(map(int,input().split()))
S=set(map(int,sys.stdin))

a,b=0,1
for i in range(1,N+1):
    if i in S:
        a,b=b,0
    else:
        a,b=b,a+b

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


# Optimized solution
import sys

N,M=list(map(int,input().split()))
bad=set(map(int,sys.stdin))
MOD=10**9+7

a,b=0,1
for i in range(1,N+1):
    if i in bad:
        a,b=b,0
        if a==0:
            break
    else:
        a,b=b,(a+b)%MOD

print(b)
# Original solution
import sys

N,M=list(map(int,input().split()))
bad=set(map(int,sys.stdin))
MOD=10**9+7

a,b=0,1
for i in range(1,N+1):
    if i in bad:
        a,b=b,0
        if a==0:
            break
    else:
        a,b=b,(a+b)%MOD

print(b)


# Optimized solution
import sys

MOD=10**9+7
N,M=list(map(int,input().split()))
bad=set(map(int,sys.stdin))

a,b=0,1
for i in range(1,N+1):
    if i in bad:
        a,b=b,0
        if a==0:
            break
    else:
        a,b=b,(a+b)%MOD

print(b)
# Original solution
from functools import lru_cache
import sys
sys.setrecursionlimit(500000)
def input() -> str:
    return sys.stdin.readline().rstrip()
mod = 10**9 + 7
@lru_cache(maxsize=None)
def dp(i):
    if i == n - 1:
        return 1
    if i == n - 2:
        return 2 - int(n - 1 in a)
    return (dp(i + 1) * int(i + 1 not in a) % mod + dp(i + 2) * int(i + 2 not in a) % mod) % mod
n, m = [int(i) for i in input().split()]
a = [int(eval(input())) for _ in range(m)]
print((dp(0)))

# Optimized solution
import sys
def input():
  return sys.stdin.readline().rstrip()
mod = 10**9 + 7
n, m = [int(i) for i in input().split()]
a = [int(eval(input())) for _ in range(m)]
notin = [1] * n
for i in a:
  notin[i] = 0
dp = [0] * n
dp[n - 1] = 1
if n > 1:
	dp[n - 2] = 1 + notin[n - 1]
for i in range(n - 3, -1, -1):
  dp[i] += dp[i + 1] * notin[i + 1] % mod
  dp[i] += dp[i + 2] * notin[i + 2] % mod
  dp[i] %= mod
print((dp[0]))
# Original solution
import sys
def input():
  return sys.stdin.readline().rstrip()
mod = 10**9 + 7
n, m = [int(i) for i in input().split()]
a = [int(eval(input())) for _ in range(m)]
notin = [1] * n
for i in a:
  notin[i] = 0
dp = [0] * n
dp[n - 1] = 1
if n > 1:
	dp[n - 2] = 1 + notin[n - 1]
for i in range(n - 3, -1, -1):
  dp[i] += dp[i + 1] * notin[i + 1] % mod
  dp[i] += dp[i + 2] * notin[i + 2] % mod
  dp[i] %= mod
print((dp[0]))

# Optimized solution
import sys


def read():
    return sys.stdin.readline().rstrip()


def main():
    n, m = list(map(int, read().split()))
    a = {int(read()) - 1 for _ in range(m)}
    if n == 1:
        print((1))
        return
    mod = 10**9 + 7
    dp = [0] * n
    if 0 not in a:
        dp[0] = 1
    if 1 not in a:
        dp[1] = 1 + dp[0]
    for i in range(2, n):
        if i in a:
            continue
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
    print((dp[-1]))


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

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

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

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

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

print((dp[-1] % mod))
# Original solution
import sys
input = sys.stdin.readline

mod=1000000007
n,m=list(map(int,input().split()))
a=[]
for i in range(m):
    a.append(int(eval(input())))
al=len(a)


f=0
for i in a:
    if i+1 in a:
        f=1
        break
if f==1:
    print((0))
else:
    dp=[0]*(n+1)
    dp[0]=1
    if 1 in a:
        dp[1]=0
        a.pop(0)
        al-=1
    else:
        dp[1]=1
    
    for i in range(2,n+1):
        if al>0 and i==a[0]:
            dp[i]=0
            a.pop(0)
            al-=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
    print((dp[n]%mod))
  

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

mod=1000000007
n,m=list(map(int,input().split()))
a=[]
for i in range(m):
    a.append(int(eval(input())))
al=len(a)


f=0
for i in range(al-1):
    if a[i+1]==a[i]+1:
        f=1
        break
if f==1:
    print((0))
else:
    dp=[0]*(n+1)
    dp[0]=1
    if 1 in a:
        dp[1]=0
        a.pop(0)
        al-=1
    else:
        dp[1]=1
    
    for i in range(2,n+1):
        if al>0 and i==a[0]:
            dp[i]=0
            a.pop(0)
            al-=1
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
    print((dp[n]%mod))
# Original solution
n,m =list(map(int, input().split()))
    #idxへの行き方の通りをリスト化
num_list = [0]*(n+1)
num_list[0] = 1
a_list =[int(eval(input())) for _ in range(m)]
if 1 not in a_list:
    num_list[1] = 1
for i in range(2,n+1):
    if i not in a_list:
        num_list[i] = num_list[i-1] + num_list[i-2]
print((num_list[n]%(10**9+7)))

# Optimized solution
n,m =list(map(int, input().split()))
    #idxへの行き方の通りをリスト化
num_list = [0]*(n+1)
num_list[0] = 1
a_list =set([int(eval(input())) for _ in range(m)])
if 1 not in a_list:
    num_list[1] = 1
for i in range(2,n+1):
    if i not in a_list:
        num_list[i] = num_list[i-1] + num_list[i-2]
print((num_list[n]%(10**9+7)))
# Original solution
def dp(n):
    d=[0]*(n+1)
    if n==1:
        return 1
    else:
         d[0]=1
         if a[1]==0:
            d[1]=1
         else:
            d[1]=0
         for i in range(2,n+1):
            if a[i]==0:
                d[i]=d[i-1]+d[i-2]
            else:
                d[i]=0
         return d[n]

n,m=list(map(int, input().split()))
a=[0]*(n+1)
for i in range(0,m):
    k=int(eval(input()))
    a[k]=1
print((dp(n)%1000000007))

# Optimized solution
def dp(n):
    d=[0]*(n+1)
    if n==1:
        return 1
    else:
         d[0]=1
         if a[1]==0:
            d[1]=1
         else:
            d[1]=0
         for i in range(2,n+1):
            if a[i]==0:
                d[i]=(d[i-1]+d[i-2])%1000000007
            else:
                d[i]=0
         return d[n]

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

#dp[i]:i段目までの上がり方

div = 1000000007

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

def stairs():
    for i in range(N-1):
        if dp[i+1] == 0 and dp[i] == 0:
            break
        if not i+2 in a:
            dp[i+2] = (dp[i+1] + dp[i]) % div
    print((dp[N]))

stairs()

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

#dp[i]:i段目までの上がり方

div = 1000000007

dp = [0] * (N+1)
dp[0] = 1
if not 1 in a:
    dp[1] = 1
else:
    del a[0]

def stairs():
    for i in range(N-1):
        if dp[i+1] == 0 and dp[i] == 0:
            break
        if a:
            if i+2 == a[0]:
                del a[0]
                continue
        dp[i+2] = (dp[i+1] + dp[i]) % div
    print((dp[N]))

stairs()
# Original solution
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from functools import lru_cache
import sys
sys.setrecursionlimit(10 ** 9)

@lru_cache(maxsize=None)
def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1
    else:
        return fib(n-1) + fib(n-2)

PRIME = 10 ** 9 + 7
N, M = list(map(int, input().split()))
broken_stairs = []
for _ in range(M):
    broken_stairs.append(int(eval(input())))

prev_broken = -1
cannot = False
ans = 1
for a in broken_stairs:
    if a - prev_broken == 1:
        cannot = True
        break
    ans *= fib(a - prev_broken - 2)
    ans %= PRIME
    prev_broken = a

ans *= fib(N - prev_broken - 1)
ans %= PRIME

if cannot:
    print((0))
else:
    print(ans)


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

def fib_memo(n):
    if n <= 1:
        return 1
    memo = [0] * n
    memo[0] = 1
    memo[1] = 2
    for i in range(2, n):
        memo[i] = (memo[i - 1] + memo[i - 2]) % PRIME
    return memo[n-1]

PRIME = 10 ** 9 + 7
N, M = list(map(int, input().split()))
broken_stairs = []
for _ in range(M):
    broken_stairs.append(int(eval(input())))

prev_broken = -1
cannot = False
ans = 1
for a in broken_stairs:
    if a - prev_broken == 1:
        cannot = True
        break
    ans *= fib_memo(a - prev_broken - 2)
    ans %= PRIME
    prev_broken = a

ans *= fib_memo(N - prev_broken - 1)
ans %= PRIME

if cannot:
    print((0))
else:
    print(ans)
# Original solution
n, m = list(map(int, input().split()))
a = list(int(eval(input())) for _ in range(m))
M = 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])%M
print((dp[n]))


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

# memo = [-1 for _ in range(n)]
step_now = 0
step_1   = 0
step_2   = 0
DIV_NUM = 1000000007
if 1 in a_list:
    step_now = 0
else:
    step_now = 1
for i in range(1, n):
    if i == 1:
        step_1 = step_now
        if i+1 in a_list:
            step_now = 0
        else:
#             memo[i] = (memo[0] + 1) % DIV_NUM
            step_now = step_1 + 1
    else:
        step_2 = step_1
        step_1 = step_now
        if i+1 in a_list:
            step_now = 0
        else:
#             memo[i] = (memo[i-1] + memo[i-2]) % DIV_NUM
            step_now = (step_1 + step_2) % DIV_NUM
    if step_now ==  step_1 == step_2 == 0:
        break

print(step_now)

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

# memo = [-1 for _ in range(n)]
step_now = 0
step_1   = 0
step_2   = 0
DIV_NUM = 1000000007
if 1 in a_list:
    a_list.pop(0)
    step_now = 0
else:
    step_now = 1
for i in range(1, n):
    if i == 1:
        step_1 = step_now
        if i+1 in a_list:
            a_list.pop(0)
            step_now = 0
        else:
#             memo[i] = (memo[0] + 1) % DIV_NUM
            step_now = step_1 + 1
    else:
        step_2 = step_1
        step_1 = step_now
        if i+1 in a_list:
            a_list.pop(0)
            step_now = 0
        else:
#             memo[i] = (memo[i-1] + memo[i-2]) % DIV_NUM
            step_now = (step_1 + step_2) % DIV_NUM
    if step_now ==  step_1 == step_2 == 0:
        break

print(step_now)
# Original solution
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

def main():
    # n, m = map(int, input().split())
    # a = [int(input()) for i in range(m)]
    n, m = list(map(int, readline().split()))
    a = list(map(int, read().split()))
    mod = 1000000007

    # フィボナッチ数列を作る要領で行う
    d = [0] * (n+1)
    # 2回0が続く状況aに連番があったら即座に終了する
    cnt = 0 
    # d[0]とd[1]を規定。aに1が含まれていることを考慮して場合分けしておく
    d[0] = 1
    if 1 not in a:
        d[1] = 1
    # else:
    #     d[1] = 1
    # 階段番号は2~nまでを見る必要がある
    for i in range(2, n+1):
        if i in a:
            d[i] = 0
            cnt += 1
            if cnt == 2:
                print('0')
                exit()
        else:
            d[i] = (d[i-1] + d[i-2]) % mod
            cnt = 0
    # print(d)  
    ans = d[n]        
    print(ans)

if __name__ == '__main__':
    main()

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

def main():
    # n, m = map(int, input().split())
    # a = [int(input()) for i in range(m)]
    n, m = list(map(int, readline().split()))
    a = set(map(int, read().split()))
    mod = 1000000007

    # フィボナッチ数列を作る要領で行う
    d = [0] * (n+1)
    # 2回0が続く状況aに連番があったら即座に終了する
    cnt = 0 
    # d[0]とd[1]を規定。aに1が含まれていることを考慮して場合分けしておく
    d[0] = 1
    if 1 not in a:
        d[1] = 1
    # else:
    #     d[1] = 1
    # 階段番号は2~nまでを見る必要がある
    for i in range(2, n+1):
        if i in a:
            d[i] = 0
            cnt += 1
            if cnt == 2:
                print('0')
                exit()
        else:
            d[i] = (d[i-1] + d[i-2]) % mod
            cnt = 0
    # print(d)  
    ans = d[n]        
    print(ans)

if __name__ == '__main__':
    main()
# Original solution
import sys
sys.setrecursionlimit(1000000)

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

a_list=[]
for i in range(m):
    a_list.append(int(eval(input())))

def count(now,s,e):
    if now > e:
        return 0
    if now == e:
        return 1
    cnt=0
    cnt+=count(now+1,s,e)
    cnt+=count(now+2,s,e)
    return cnt


c_mod=1000000007
start=0
end=0
ans=1
before=100000
for a in a_list:
    if abs(before-a)==1:
        print((0))
        exit()
    # 各部分の移動方法
    end=a-1
    ans=ans*count(start,start,end)%c_mod
    start=a+1
    before=a
if end<n:
    end=n
    ans=ans*count(start,start,end)%c_mod
print(ans)


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

step=[0]*(n+1)
for _ in range(m):
    a=int(eval(input()))
    step[a-1]=-1

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

step=[0]*(n+1)
for _ in range(m):
    a=int(eval(input()))
    step[a-1]=-1

if step[0]!=-1:
    step[0]=1
if step[1]!=-1:
    step[1]=1
for i in range(n-1):
    if step[i]==-1:
        continue
    if step[i+1]!=-1:
        step[i+1]+=step[i]
    if step[i+2]!=-1:
        step[i+2]+=step[i]
print((step[n-1]%c_mod))


# Optimized solution
c_mod=1000000007
n,m = list(map(int,input().split()))
 
a_list=[]
for i in range(m):
    a_list.append(int(eval(input())))

fib=[0]*(n+1)
fib[0]=1
fib[1]=1
for i in range(2,n+1):
    fib[i]=fib[i-1]+fib[i-2]

def count(s,e):
    return fib[e-s]
 
c_mod=1000000007
start=0
end=0
ans=1
before=100000
for a in a_list:
    if abs(before-a)==1:
        print((0))
        exit()
    # 各部分の移動方法
    end=a-1
    ans=ans*count(start,end)%c_mod
    start=a+1
    before=a
if end<n:
    end=n
    ans=ans*count(start,end)%c_mod
print(ans)
# Original solution
N, M = list(map(int, input().split()))
MOD = 10 ** 9 + 7
dp = [0] * (N+1)
dp[0] = 1
a = set()
for _ in range(M):
    a.add(int(eval(input())))
if 1 in a:
    if 2 in a:
        print((0))
        exit()
    dp[2] = 1
    start = 3
else:
    dp[1] = 1
    start = 2
for i in range(start, 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()
for i in range(M):
    A.add(int(eval(input())))
count = [0] * (N+1)
count[0] = 1
mod = 10 ** 9 + 7
if 1 in A:
    if 2 in A:
        print((0))
        exit()
    count[2] = 1
    start = 3
else:
    count[1] = 1
    start = 2
for i in range(start, N+1):
    if i in A:
        continue
    count[i] = count[i-1] + count[i-2]
    count[i] %= mod
print((count[N]))
# Original solution
def C_TypicalStairs():
    N, M = list(map(int, input().split()))
    am = [int(eval(input())) for i in range(M)]
    n_list = [i for i in range(N+1)]
    can_move = True
    num_move = 0
    if(M == 0):
        num_move = fib(len(n_list))
    else:
        # 到達不可を除く
        for i in range(M-1):
            if ((am[i] + 1) == am[i+1]):
                can_move = False
        if (can_move):
            num_move = fib(len(n_list[:am[0]]))
            if (M <= 1):
                pass
            else:
                for i in range(M-1):
                    num_move *= fib(len(n_list[am[i]+1:am[i+1]]))
            num_move *= fib(len(n_list[am[M-1]+1:]))
    print((num_move % 1000000007))

def fib(n):
    if (n <= 1):
        a0 = n
    else:
        a0, a1 = 0, 1
        for _ in range(n):
            a0, a1 = a1, a0 + a1
    return a0
if __name__ == "__main__":
    C_TypicalStairs()

# Optimized solution
def C_TypicalStairs():
    N, M = list(map(int, input().split()))
    am = [int(eval(input())) for i in range(M)]
    can_move = True
    num_move = 0
    if(M == 0):
        num_move = fib(N+1)
    else:
        # 到達不可を除く
        for i in range(M-1):
            if ((am[i] + 1) == am[i+1]):
                can_move = False
        if (can_move):
            num_move = fib(am[0])
            if (M <= 1):
                pass
            else:
                for i in range(M-1):
                    num_move *= fib(am[i+1] - am[i] - 1)
            num_move *= fib(N - am[M-1])
    print((num_move % 1000000007))

def fib(n):
    if (n <= 1):
        a0 = n
    else:
        a0, a1 = 0, 1
        for _ in range(n):
            a0, a1 = a1, a0 + a1
    return a0
if __name__ == "__main__":
    C_TypicalStairs()
# Original solution
import sys
n, m = list(map(int, input().split()))

As = []
a_ = -1
for i in range(m):
  a = int(eval(input()))
  if a == a_ + 1:
    print((0))
    sys.exit()
  As.append(a)
  a_ = a

nums = [1] + [0] * n
if 1 in As:
  pass
else:
  nums[1] = 1
  
for i in range(2, n + 1):
  if i in As:
    continue
  else:
    nums[i] = (nums[i-1] + nums[i-2]) % 1000000007
    
print((nums[-1]))

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

if m > 0:
  As = set(map(int, sys.stdin))
else:
  As = set()

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

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

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

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

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

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

for i in range(2,n+1):
    if dp[i] == -1:
        if i <= 2:
            dp[i] = dp[i-1]+1
        elif i>=3 :
            dp[i] = (dp[i-1]+ dp[i-2])%mod

print((dp[n]))
# Original solution
n, m = [int(x) for x in input().split()]
a = []
for _ in range(m):
    a.append(int(eval(input())))

mod = 1000000007

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

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

print((dp[n]))

# Optimized solution
n, m = [int(x) for x in input().split()]
a = set([int(eval(input())) for _ 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]))