CodeEff/ECCO huggingface dataset:
# Original solution
mod=1000000007
N,M=list(map(int,input().split()))
dp=[0]*(N+1)
dp[0]=1
A=[int(eval(input())) for i in range(M)]
for i in range(1,1+N):
    if i in A:
        continue
    else:
        if i==1:
            dp[i]=dp[i-1]%mod
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
print((dp[N]))

# Optimized solution
mod=1000000007
N,M=list(map(int,input().split()))
dp=[-1]*(N+1)
dp[0]=1

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

h = []
a = 1
b = 0
mod = 10 ** 9 + 7

for i in range(m):
    h += [int(eval(input())),]

for i in range(1,n+1):
    if i in h:
        a,b = 0,a
    else:
        a,b = a + b,a
        a %= mod
        

print((a % mod))

# Optimized solution
n,m = list(map(int,input().split()))
 
h = []
a = 1
b = 0
mod = 10 ** 9 + 7
 
for i in range(m):
    h += [int(eval(input())),]
h += [0,]
    
cur = 0
for i in range(1,n):
    if i == h[cur]:
        a,b = 0,a
        cur += 1
    else:
        a,b = a + b,a
        a %= mod

print(((a + b) % mod))
# Original solution
#N = int(input())
INF = 1000000007
N,M = list(map(int,input().split()))
a_list = [-1]
for i in range(M):
    a_list.append(int(eval(input())))
a_list.append(N+1)
a_list.sort()
sa_list = []
for i in range(1,M+2):
    sa_list.append(a_list[i]-a_list[i-1])

def fibonacci(n):
    if (n<=1):
        return (n)
    else:
        return(fibonacci(n-1) + fibonacci(n-2))
n=max(sa_list)+2
fib_list=[]
for i in range(n-1):
    fib_list.append(fibonacci(i))
ans = 1
for sa_i in range(len(sa_list)):
    sa = sa_list[sa_i]
#    print(sa)
    ans = ans*fib_list[sa-1]
    ans = ans % INF
print(ans)

# Optimized solution
#N = int(input())
INF = 1000000007
N,M = list(map(int,input().split()))
a_list = [-1]
for i in range(M):
    a_list.append(int(eval(input())))
a_list.append(N+1)
a_list.sort()
sa_list = []
for i in range(1,M+2):
    sa_list.append(a_list[i]-a_list[i-1])

#def fibonacci(n):
#    if (n<=1):
#        return (n)
#    else:
#        return(fibonacci(n-1) + fibonacci(n-2))
n=max(sa_list)+2
fib_list = []

a, b = 0, 1
for i in range(n):
    fib_list.append(a)
    a, b = b, a + b

#fib_list = [i for i in fib(n)]
#for i in range(n-1):
#    fib_list.append(fibonacci(i))
ans = 1
for sa_i in range(len(sa_list)):
    sa = sa_list[sa_i]
#    print(sa)
    ans = ans*fib_list[sa-1]
    ans = ans % INF
print(ans)
# Original solution
from sys import stdin
N,M = list(map(int,input().split()))
a = [int(stdin.readline()) for _ in range(M)]
A = [0]*(N+1)
mod = 1000000007
A[0] = 1
if not(1 in a):
  A[1] = 1
for i in range(2,N+1):
    if i in a:
      A[i] = 0
    else:
      A[i] = (A[i-2] + A[i-1]) % mod
print((A[N]))


# Optimized solution
from sys import stdin
N,M = list(map(int,input().split()))
a = [int(stdin.readline()) for _ in range(M)]
A = [0]*(N+1)
mod = 1000000007
A[0] = 1
A[1] = 1
for i in a:
  A[i] = -1
if A[1] == -1:
  A[1] = 0
if not(1 in a):
  A[1] = 1
for i in range(2,N+1):
    if A[i] == -1:
      A[i] = 0
    else:
      A[i] = (A[i-2] + A[i-1]) % mod
print((A[N]))
# Original solution
n,m=list(map(int,input().split()))
stair_m=[True]*(110000)
for i in range(m):
    a=int(eval(input()))
    stair_m[a]=False
dp=[0]*(110000)
dp[0]=1
for i in range(1,n+1):
    if stair_m[i]:
        dp[i]=dp[i-1]+dp[i-2]
    else:
        dp[i]=0
print((dp[n]%1000000007))

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


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

for i in range(1,n+1):
    if stair[i]:
        dp[i]=0
    else:
        dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
print((dp[n]))
# Original 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
n = [1, 1]
cnt = 2
while cnt!=N+1:
    if cnt-1 in a:n[1]=0
    n[0], n[1] = n[1], (n[0]+n[1])%MOD 
    cnt += 1
    if n[1]==0:break
 
print((n[-1]%(10**9+7)))

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

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

broken= [False]*(N+1)
for i in range(M):
    broken[int(eval(input()))] = True

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

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

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

print((dp[0]))

# Optimized solution
N, M = list(map(int, input().split()))
mod = 1000000007
dp = [0] * (N+2)
A = set([int(eval(input())) for _ in range(M)]) 
dp[-2] = 1

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

print((dp[0]))
# Original solution
INF = float("inf") #const

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

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

    print((dp[n]%(10**9+7)))


def issafe(i,a):
    if i in a:
        return False
    else:
        return True


if __name__ == "__main__":
    main()


# Optimized solution
INF = float("inf") #const

def main():
    n,m = list(map(int,input().split()))
    issafe = [True]*n
    for i in range(m):
        a = int(eval(input()))
        issafe[a] = False
    dp = [0]*(n+1)
    dp[0],dp[1] = 1,1

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

    print((dp[n]%(10**9+7)))


if __name__ == "__main__":
    main()
# Original solution
n,m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
p = [0]*(n+1)
p[0] = 1
if 1 not in a:
  p[1] = 1

t = 1000000007

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


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

t = 1000000007

for i in range(2, n+1):
  if i in a:
    continue
  s = p[i-1] + p[i-2]
  s = s%t
  p[i] = s
  
print((p[n]))
# Original solution
n,m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]

mod = 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] %= mod
  
print((dp[n]))

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

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

mod = 1000000007
nums = [0]*(n+1)
nums[0] = 1
if 1 not in a: nums[1] = 1
for i in range(2,n+1):
  if i in a: continue
  nums[i] = nums[i-1] + nums[i-2]

print((nums[n]%mod))

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

mod = 1000000007
nums = [0]*(n+1)
nums[0] = 1
if 1 not in a: nums[1] = 1
for i in range(2,n+1):
  if i in a: continue
  nums[i] = nums[i-1] + nums[i-2]

print((nums[n]%mod))
# Original solution
n,m = list(map(int, input().split()))
a = list(set([int(eval(input())) for _ in range(m)]))

nums = [0]*(n+1)
nums[0] = 1
if 1 not in a: nums[1] = 1

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

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

nums = [0]*(n+1)
nums[0] = 1
if 1 not in a: nums[1] = 1

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

mod = 10**9+7
ans = [0]*(n+1)
ans [0] = 1
if 1 not in a: ans[1] = 1

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

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

mod = 10**9+7
ans = [0]*(n+1)
ans [0] = 1
if 1 not in a: ans[1] = 1

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

#フィボナッチ数列
dp = [0 for i in range(n+2)]
dp[0] = 1
dp[1] = 1
for i in range(2,n+2):
    dp[i] = dp[i-1] + dp[i-2]

#穴が無い場合
if m==0:
    print((dp[n]%mod))
    exit()

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

#2連続穴がある場合
for i in range(len(lst)-1):
    if lst[i]+1 == lst[i+1]:
        print((0))
        exit()

lst2 = []
for i in range(len(lst)):
    if i==0:
        lst2.append(lst[0]-1)
    else:
        lst2.append(lst[i]-lst[i-1]-2)
lst2.append(n-lst[-1]-1)

ans = 1
for i in lst2:
    ans *= dp[i]
    ans %= mod

# print(lst)
# print(lst2)
print(ans)


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

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

#フィボナッチ数列
dp = [-1 for i in range(n+2)]
dp[0] = 1
dp[1] = 1
for i in lst:
    dp[i] = 0
for i in range(2,n+2):
    if dp[i]<0:
        dp[i] = dp[i-1] + dp[i-2]

# print(lst)
# print(lst2)
# print(dp)
print((dp[n]%mod))
# Original solution
N, M = list(map(int, input().split()))
A = list(int(eval(input())) for i in range(M))
MOD = 10 ** 9 + 7
DP = [0] * (N + 10)
if 1 not in A:
    DP[1] = 1
if 2 not in A and 1 in A:
    DP[2] = 1
if 2 not in A and 1 not in A:
    DP[2] = 2
for i in range(3, N + 1):
    if i not in A:
        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 i in range(M))
MOD = 10 ** 9 + 7
DP = [0] * (N + 10)
if 1 not in A:
    DP[1] = 1
if 2 not in A and 1 in A:
    DP[2] = 1
if 2 not in A and 1 not in A:
    DP[2] = 2
for i in range(3, 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 i in range(M)]

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

for i in range(2, N+1):
    # 壊れた床がなく単純に求める場合
    #dp[i] = dp[i-1]+dp[i-2]

    if not i-1 in a:
        dp[i] += dp[i-1]
    if not i-2 in a:
        dp[i] += dp[i-2]

print((dp[N] % 1000000007))


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

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

for i in range(2, N+1):
    # 壊れた床がなく単純に求める場合
    #dp[i] = dp[i-1]+dp[i-2]

    if not i-1 in A:
        dp[i] += dp[i-1]
    if not i-2 in A:
        dp[i] += dp[i-2]

print((dp[N] % 1000000007))
# Original solution
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(eval(input()))
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

N, M = l_inpl()
a = [ i_inpl() for _ in range(M)]
# for _ in range(M):
#     ai = i_inpl()
#     a.append(ai)

dp = [None] * (N+1)

dp[N] = 1
# print(dp)
for i in range(N-1, -1, -1):
    if i in a:
        dp[i] = 0
    else:
        if N-1 == i:
            dp[i] = 1
        else:
            if i+1 in a and i+2 in a:
                dp[i] = 0
            elif i+1 in a:
                dp[i] = dp[i+2]
            elif i+2 in a:
                dp[i] = dp[i+1]
            else:
                dp[i] = dp[i+1] + dp[i+2]

print((dp[0] % 1000000007))

# Optimized solution
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(eval(input()))
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

N, M = l_inpl()
a = { i_inpl(): True for _ in range(M)}
# for _ in range(M):
#     ai = i_inpl()
#     a.append(ai)

dp = [None] * (N+1)

dp[N] = 1
# print(dp)
for i in range(N-1, -1, -1):
    if i in a:
        dp[i] = 0
    else:
        if N-1 == i:
            dp[i] = 1
        else:
            if i+1 in a and i+2 in a:
                dp[i] = 0
            elif i+1 in a:
                dp[i] = dp[i+2]
            elif i+2 in a:
                dp[i] = dp[i+1]
            else:
                dp[i] = dp[i+1] + dp[i+2]

print((dp[0] % 1000000007))
# Original solution
#!/usr/bin/env python3
#ABC129 C

import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,m = LI()
a = [I() for _ in range(m)]
dp = [0]*(n+1)
dp[0],dp[1] = 1,1
for i in a:
    dp[i] = -1
for i in range(2,n+1):
    if dp[i] < 0:
        continue
    if dp[i-1] < 0:
        dp[i] = dp[i-2]
        continue
    if dp[i-2] < 0:
        dp[i] = dp[i-1]
        continue
    dp[i] = (dp[i-1] + dp[i-2]) % mod
if dp[-1] == -1:
    print((0))
else:
    print((dp[-1]))


# Optimized solution
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n,m = LI()
f = defaultdict(int)
for i in range(m):
    a = I()
    f[a] = 1

dp = [0]*(n+1)
dp[0] = 1
for i in range(1,n+1):
    if f[i]:
        continue
    if i > 1:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= mod
    else:
        dp[i] = dp[i-1]
        dp[i] %= mod
print((dp[n]))
# Original solution
N, M = list(map(int, input().split()))
mae = 0
sub = []
flag = False

for _ in range(M):
  broken = int(eval(input()))
  if mae == broken: # 不可能
    flag = True
  if flag:
    continue
  if mae+1 == broken:
    mae = broken + 1
    continue
  sub.append(broken-1-mae)
  mae = broken + 1
# 無理な時
if flag:
  print((0))
  exit()
# forの中で最後まで行ってない分の追加
if mae != N:
  sub.append(N-mae)

from operator import mul
from functools import reduce

# nCrの関数
def C(n, r):
    r = min(r, n - r)
    numer = reduce(mul, list(range(n, n - r, -1)), 1)
    denom = reduce(mul, list(range(1, r + 1)), 1)
    return numer // denom
# 壊れてるやつの間の上り方の場合の数
def count(n):
  ans = 1
  for i in range(n//2):
    ans += C(n-i-1, i+1)
  return ans

ans = 1
waru = 10**9+7
for s in sub:
  ans *= count(s)%waru
print((ans%waru))

# Optimized solution
N, M = list(map(int, input().split()))
A = [True]*N
for _ in range(M):
  a = int(eval(input()))
  A[a-1] = False # 壊れてるところはfalse

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

dp[0], dp[1] = 1, 1 # 初期条件
if not A[0]: # 1段目が壊れてたら
  dp[1] = 0

for i in range(2,N+1):
  # 壊れてるところはdp=0にする
  if not A[i-1]:
    dp[i] = 0
  else:
    dp[i] = (dp[i-1] + dp[i-2])%waru
print((dp[-1]))
# Original solution
n,m=list(map(int,input().split()))
broken=[False for i in range(n+1)]
for i in range(m):
    a=int(eval(input()))
    broken[a]=True
ans=[1]
if broken[1]:
    ans.append(0)
else:
    ans.append(1)
for i in range(2,n+1):
    if broken[i]:
        ans.append(0)
    else:
        ans.append((ans[i-1]+ans[i-2])%1000000007)
print((ans[n]))


# Optimized solution
#n=int(input())
n,m=list(map(int,input().split()))
#t=int(input())
#al=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

dp=[0]*(n+1)
mod=10**9+7
broken={i:False for i in range(1,n+1)}
for i in range(m):
    a=int(eval(input()))
    broken[a]=True
if broken[1]:
    dp[1]=0
else:
    dp[1]=1
dp[0]=1
for i in range(2,n+1):
    if not broken[i]:
        dp[i]=(dp[i-1]+dp[i-2])%mod

print((dp[n]))
# Original solution
import sys
input=sys.stdin.readline
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
N,M = list(map(int,input().split()))
A = [int(eval(input())) for _ in range(M)]  
ans = [0] * (N+3)
ans[0] = 1
for i in range(N):
    if i not in A:
        ans[i+1] += ans[i]
        ans[i+1] = ans[i+1] % 1000000007
        ans[i+2] += ans[i]
        ans[i+2] = ans[i+2] % 1000000007
    else:
        ans[i] = 0
print((ans[N]))

# Optimized solution
import sys
input=sys.stdin.readline
#import fractions
#import math
#import collections
#from collections import deque
#from bisect import bisect_left
#N = int(input())
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
N,M = list(map(int,input().split()))
dicti = {i:True for i in range(N+2)}
for i in range(M):
    a = int(eval(input()))
    dicti[a] = False
ans = [0] * (N+3)
ans[0] = 1
for i in range(N):
    if dicti[i]:
        ans[i+1] += ans[i]
        ans[i+1] = ans[i+1] % 1000000007
        ans[i+2] += ans[i]
        ans[i+2] = ans[i+2] % 1000000007
    else:
        ans[i] = 0
print((ans[N]))
# Original solution
n, m = list(map(int, input().split()))
a = []
for i in range(m):
    a.append(int(eval(input())))
mod = 10 ** 9+ 7

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

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

com = [0, 1]
for i in range(n):
    if (i + 1) in a:
        com.append(0)
    else:
        com.append((com[-1] + com[-2]) % mod)
print((com[-1]))
# Original solution
NM = list(map(int,input().split()))
N = NM[0]
M = NM[1]

A =[]
while True:
    try:
        A.append(int(eval(input())))
    except:
        break;

countlist = [1,1,2]
if N >3:
    for i in range(3,N+1):
        a = countlist[i-2]+countlist[i-1]
        if a>1000000007:
            a = a%1000000007
        countlist.append(a)

t = 0
count = 0
out = []

if N >1:
    for i in range(1,N+1):
        count+=1
        if ((t<len(A))and(i==A[t])):
            t+= 1
            while ((t<len(A))and(i==A[t])):
                t+=1
            if count > 0:
                out.append(countlist[count-1])
            else:
                out.append(0)
                break
            count = -1


if count>=0:
    out.append(countlist[count])

output = 1

for i in range(len(out)):
    output = output*out[i]
    if output > 1000000007:
        output = output%1000000007

print(output)

# Optimized solution
N,M = list(map(int,input().split()))
p=10**9+7
A = [0]*(N+1)
flag = 0
for i in range(M):
    tmp = int(eval(input()))
    A[tmp]=1
    if A[tmp]*A[tmp-1]>0:
        flag=1
        break
if flag==1:
    print((0))
else:
    dp = [0]*(N+1)
    dp[0] = 1
    dp[1] = 1-A[1]
    for i in range(2,N+1):
        if A[i]==1:
            continue
        dp[i]=(dp[i-1]+dp[i-2])%p
    print((dp[-1]))
# Original solution
n,m=list(map(int,input().split()))
a=list(int(eval(input())) for i in range(m))
x=[0]*(n+1)
x[0]=1
for i in range(1,n+1):
    x[i]=(x[i-1]+x[i-2])%(10**9+7)
    if i in a:
        x[i]=0
print((x[n]))

# Optimized solution
n,m=list(map(int,input().split()))
A=set(int(eval(input())) for i in range(m))
 
x=[0]*(n+1)
x[0]=1
if 1 in A:
    x[1]=0
else:
    x[1]=1
 
for j in range(2,n+1):
    if j in A:
        x[j]=0
    else:
        x[j]=(x[j-1]+x[j-2])%(10**9+7)
        
 
print((x[n]))
# Original solution
import math
#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)]


from operator import mul
from functools import reduce

def comb(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

def stair_count(start,end):
    #print(start,end)
    aida = end - start
    total = 0
    i = aida
    #print("aida/2={}".format(aida/2))
    kazu = 0
    while i >= kazu:
        total += comb(i,kazu)
        kazu += 1
        i -= 1
    return total

start = 0
answer = 1
for i in a:
    #print("i={}".format(i))
        if i == start:
            print((0))
            exit()
        else:
            answer = (answer * stair_count(start, i-1))
            start = i+1
answer = (answer * stair_count(start, N))
    #print("answer={}".format(answer))
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)
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))