CodeEff/ECCO huggingface dataset:
# Original solution
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
def f(target_step):
    global kazu_memo
    #print(target_step)
    if target_step in a:
        return 0
    elif target_step < 0:
        return 0
    elif target_step == 0:
        return 1
    else:
        if kazu_memo[target_step] > 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = 0
            kazu_tmp += f(target_step - 1)
            kazu_tmp += f(target_step - 2)
            kazu_memo[target_step] = kazu_tmp % large_p
            return kazu_tmp % large_p

def main():
    global a, kazu_memo
    n, m = list(map(int, input().split()))
    a = [int(eval(input())) for _ in range(m)]

    kazu_memo = {e: -1 for e in range(1, n + 1)}
    r = f(n)
    print((r % large_p))


if __name__ == '__main__':
    main()


# Optimized solution
import sys
sys.setrecursionlimit(10**6)
large_p = 10**9 + 7
a = []
kazu_memo = {}
kazu_tmp = 0
def f(target_step):
    global kazu_memo, kazu_tmp
    #print(target_step)
    if target_step < 0:
        return 0
    else:
        if kazu_memo[target_step] >= 0:
            return kazu_memo[target_step]
        else:
            kazu_tmp = (f(target_step - 1) + f(target_step - 2)) % large_p
            kazu_memo[target_step] = kazu_tmp
            return kazu_tmp

def main():
    global a, kazu_memo
    n, m = list(map(int, input().split()))
    kazu_memo = {e: -1 for e in range(0, n + 1)}
    kazu_memo[0] = 1
    for _ in range(m):
        ta = int(eval(input()))
        kazu_memo[ta] = 0

    r = f(n)
    print((r % large_p))


if __name__ == '__main__':
    main()
# Original solution
mod = 1000000007
n, m = list(map(int, input().split()))
dat_m = []
dp = []
for i in range(n + 1):
    dp.append([0] * (n + 1))
for i in range(m):
    dat_m.append(int(eval(input())))
dp[0][0] = 1
#print(dp[0][0])
for i in range(1, n + 1):
    #dp[i][:i-1] = dp[i-1][:i - 1]
    dp[i][i-1] = dp[i - 1][i - 1]
    dp[i][i] = dp[i - 1][i - 1]

    if i > 1:
        dp[i][i] += dp[i - 1][i - 2]
        dp[i][i-2] = dp[i - 1][i - 2]

    if i in dat_m:
        dp[i][i] = 0

    dp[i][i] = dp[i][i] % mod

import pprint
print((dp[n][n]))
#pprint.pprint(dp)

# Optimized solution
mod = 1000000007
n, m = list(map(int, input().split()))
dat_m = []
dp = [0] * (n + 1)
for i in range(m):
    dat_m.append(int(eval(input())))
dp[0] = 1
for i in range(1, n + 1):
    #print(dp)
    dp[i] = dp[i - 1]

    if i > 1:
        dp[i] += dp[i - 2]

    if i in dat_m:
        dp[i] = 0

    dp[i] = dp[i] % mod

#import pprint
print((dp[n]))
#pprint.pprint(dp)
# Original solution
mod = 1000000007
import collections
n, m = list(map(int, input().split()))
dat_m = []
dp = collections.deque([])
for i in range(m):
    dat_m.append(int(eval(input())))
dp.append(1)
for i in range(1, n + 1):
    t = 0
    t = dp[i - 1]
    if i > 1:
        t += dp[i - 2]
    if i in dat_m:
        t = 0
    t = t % mod
    dp.append(t)

print((dp[n]))

# Optimized solution
mod = 1000000007
n, m = list(map(int, input().split()))
dat_m = []
dp = [0] * (n + 1)
for i in range(m):
    t = int(eval(input()))
    dp[t] = -1

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

print((dp[n]))
# Original solution
N, M = list(map(int, input().split()))
MOD = 10 ** 9 + 7
Broken = [0] * (N + 2)
for i in range(M):
    ai = int(eval(input()))
    Broken[ai] = 1


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

for i in range(N):
    if (Broken[i + 1] == 0) and (i + 1) <= N:
        dp[i + 1] += dp[i]
        dp[i + 1] %= MOD

    if (Broken[i + 2] == 0) and (i + 2) <= N:
        dp[i + 2] += dp[i]
        dp[i + 2] %= MOD

print((dp[N] % MOD))


# Optimized solution
N, M = list(map(int, input().split()))
MOD = 10 ** 9 + 7
Broken = [0] * (N + 100)
for i in range(M):
    ai = int(eval(input()))
    Broken[ai] = 1


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

for i in range(N):
    if (Broken[i + 1] == 0) and (i + 1 <= N):
        dp[i + 1] += dp[i]
        dp[i + 1] %= MOD

    if (Broken[i + 2] == 0) and (i + 2 <= N):
        dp[i + 2] += dp[i]
        dp[i + 2] %= MOD

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

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

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

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


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

n,m = list(map(int, input().split()))
a = {}
for i in range(m):
    a[int(eval(input()))] = 0

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

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

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

n, m = list(map(int, input().split()))
s = set(map(int, [eval(input()) for _ in range(m)]))
MOD = 10 ** 9 + 7
a = 1 if not 0 in s else 0
b = 1 if not 1 in s else 0
for i in range(2, n + 1):
    if i in s:
        a, b = b, 0
    else:
        a, b = b, (a + b) % MOD
print(b)
# Original solution
# ABC129C - Typical Stairs
import sys
input = sys.stdin.readline

def main():
    n, m = tuple(map(int, input().split()))
    A = set(map(int, [eval(input()) for _ in range(m)]))
    MOD = 10 ** 9 + 7
    a, b = 1, 1 if not 1 in A else 0
    for i in range(2, n + 1):
        if i in A:
            a, b = b, 0
        else:
            a, b = b, (a + b) % MOD
    print(b)


if __name__ == "__main__":
    main()

# Optimized solution
# ABC129C - Typical Stairs
import sys
input = sys.stdin.readline

def main():
    N, M = tuple(map(int, input().split()))
    A = set(map(int, [eval(input()) for _ in range(M)]))
    MOD = 10 ** 9 + 7
    dp = [0] * (N + 1)
    dp[:2] = 1, 1 if 1 not in A else 0
    for i in range(2, N + 1):
        if i not in A:
            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 = [int(eval(input())) for _ in range(M)]

if any([abs(A[i+1] - A[i] == 1) for i in range(len(A)-1)]):
  print((0))
  exit()

mod = pow(10, 9) + 7
dp = [0] * (N+1+2)
dp[0] = 1
if 1 not in A:
  dp[1] = 1
  
for i in range(2, N+1):
  if i not in A:
    if i-1 not in A:
      dp[i] = (dp[i] + dp[i-1]) % mod
    if i-2 not in A:
      dp[i] = (dp[i] + dp[i-2]) % mod
print((dp[N]))

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

if any([abs(A[i+1] - A[i] == 1) for i in range(len(A)-1)]):
  print((0))
  exit()

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

mod = pow(10, 9) + 7
dp = [0] * (N+1+2)
dp[0] = 1
if is_ok[1]:
  dp[1] = 1
  
for i in range(2, N+1):
  if is_ok[i]:
    if is_ok[i-1]:
      dp[i] = (dp[i] + dp[i-1]) % mod
    if is_ok[i-2]:
      dp[i] = (dp[i] + dp[i-2]) % mod

print((dp[N]))
# Original solution
 # -*- coding: utf-8 -*-
n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]

INF = 10 ** 9 + 7

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]))


# Optimized solution
 # -*- coding: utf-8 -*-
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
#!/usr/bin/env python
# coding: utf-8

# In[15]:


from collections import deque


# In[9]:


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


# In[31]:


dp = deque([0]*2)
dp[0] = 1
ans = 0
mod = 1000000007
if N == 1:
    ans = 1
else:
    if 1 in alist:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N+1):
        if i in alist:
            dp.append(0)
        else:
            dp.append((dp[0] + dp[1])%mod)
        dp.popleft()
    ans = dp[-1]
print(ans)


# In[ ]:






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

# In[15]:


from collections import deque


# In[38]:


N,M = list(map(int, input().split()))
alist = [False]*N
for _ in range(M):
    alist[int(eval(input()))-1] = True


# In[41]:


dp = deque([0]*2)
dp[0] = 1
ans = 0
mod = 10**9+7
if N == 1:
    ans = 1
else:
    if alist[0]:
        dp[1] = 0
    else:
        dp[1] = 1
    for i in range(2,N+1):
        if alist[i-1]:
            dp.append(0)
        else:
            dp.append((dp[0]+dp[1])%mod)
        dp.popleft()
    ans = dp[-1]
print(ans)


# In[ ]:
# 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

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

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

print((dp[-1]))

# Optimized solution
n, m = list(map(int, input().split()))
a = [0] * (n + 1)
for _ in range(m):
    a[int(eval(input()))] = True
MOD = 10 ** 9 + 7

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

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

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

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

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

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

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

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

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


MOD = 10**9 + 7

N, M = inpl()
A = [False for i in range(N + 1)]
for i in range(M):
    a = int(eval(input()))
    A[a] = True
p = 1
pp = 0
ans = 0

for i in range(1, N + 1):
    if A[i] is True:
        pp = p
        p = 0
    else:
        ans = p + pp
        pp = p
        p = ans
    # print(ans)

print((ans % MOD))


# Optimized solution
def inpl():
    return list(map(int, input().split()))


MOD = 10**9 + 7

N, M = inpl()
A = [False for i in range(N + 1)]
for i in range(M):
    a = int(eval(input()))
    A[a] = True
p = 1
pp = 0
ans = 0

for i in range(1, N + 1):
    if A[i] is True:
        pp = p
        p = 0
    else:
        ans = (p + pp) % MOD
        pp = p
        p = ans
    # print(ans)

print((ans % MOD))
# Original solution
N,M=list(map(int, input().split())) 
a=[0]*M
for i in range(M):
  a[i]=int(eval(input()))

dp=[0]*(N+1)
dp[0]=1
if 1 in a:
  dp[1]=0
else:
  dp[1]=1
  
for j in range(2,N+1):
  if j in a:
    dp[j]=0
  else:
    dp[j]=dp[j-2]+dp[j-1]

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

# Optimized solution
N,M=list(map(int, input().split())) 
a=[0]*M
for i in range(M):
  a[i]=int(eval(input()))
b=set(a)

dp=[0]*(N+1)
dp[0]=1
if 1 in b:
  dp[1]=0
else:
  dp[1]=1
  
for j in range(2,N+1):
  if j in b:
    dp[j]=0
  else:
    dp[j]=dp[j-2]+dp[j-1]

#print(dp)
print((dp[-1]%1000000007))
# Original solution
inf = 7 + (10 ** 9)
n, m = list(map(int, input().split()))
dp = [0] * (n + 1)
out = []
dp[0] = 1
for _ in range(m):
    out.append(int(eval(input())))
for i in range(n):
    if ((i + 1) not in out) & (i not in out):
        if i < n:
            dp[i + 1] = dp[i + 1] + dp[i]
    if ((i + 2) not in out) & (i not in out):
        if i + 1 < n:
            dp[i + 2] = dp[i + 2] + dp[i]
print((dp[-1] % inf))

# Optimized solution
inf = 7 + (10 ** 9)
n, m = list(map(int, input().split()))
dp1 = [0] * (n + 1)
dp1[0] = 1
for _ in range(m):
    a = int(eval(input()))
    dp1[a] = - inf
for i in range(n):
    if i < n:
        if (dp1[i + 1] != -inf) & (dp1[i] != -inf):
                dp1[i + 1] = dp1[i + 1] + dp1[i]
    if i + 1 < n:
        if (dp1[i + 2] != -inf) & (dp1[i] != -inf):
                dp1[i + 2] = dp1[i + 2] + dp1[i]
print((dp1[-1] % inf))
# Original solution
import sys

N,M = list(map(int, input().split()))
a = [int(eval(input())) - 1 for i in range(M)]
memo = [0 for i in range(N)]

for i in range(N):
    if i in a:
        memo[i] = 0
        continue
    if i == 0:
        memo[i] = 1
        continue
    if i == 1:
        memo[i] = 1 + memo[0]
        continue
    memo[i] = memo[i-1] + memo[i-2]

print((memo[N-1] % 1000000007))

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

for i in range(N):
    if i in a:
        memo[i] = 0
        continue
    if i == 0:
        memo[i] = 1
        continue
    if i == 1:
        memo[i] = 1 + memo[0]
        continue
    memo[i] = (memo[i-1] + memo[i-2]) % 1000000007

print((memo[N-1]))
# Original solution
n,m=[int(i) for i in input().split()]
dp=[1,1] ;a=set() ; mod=(10**9+7)
for i in range(m):
    a.add(int(eval(input())))
if 1 in a: dp[1]=0
for i in range(2,n+1):
    if i not in a:
        dp.append((dp[-1]+dp[-2])%mod)
    else:
        dp.append(0)
print((dp[-1]))
    


# Optimized solution
import sys
input = lambda: sys.stdin.readline().rstrip()
n,m=[int(i) for i in input().split()]
dp=[1,1] ;a=set() ; mod=(10**9+7)
for i in range(m):
    a.add(int(eval(input())))
if 1 in a: dp[1]=0
for i in range(2,n+1):
    if i not in a:
        dp.append((dp[-1]+dp[-2])%mod)
    else:
        dp.append(0)
print((dp[-1]))
# Original solution
import sys
sys.setrecursionlimit(1000000000)
input = sys.stdin.readline

N,M = (int(x) for x in input().split())
a = set(int(eval(input())) for _ in range(M))
mem = [0] * N
def count_steps(n):
    if mem[n-1]:
        return mem[n-1]
    elif n - 1 in a and n - 2 in a:
        return 0
    elif n - 1 in a:
        if n > 2:
            mem[n-1] = count_steps(n-2)
            return mem[n-1]
        else:
            mem[1] = 1
            return 1
    elif n - 2 in a:
        mem[n-1] = count_steps(n-1)
        return mem[n-1]
    elif n == 1:
        mem[0] = 1
        return 1
    elif n == 2:
        mem[1] = 2
        return 2
    else:
        mem[n-1] = (count_steps(n-1) + count_steps(n-2)) % 1000000007
        return mem[n-1]
print((count_steps(N)))

# Optimized solution
N,M = (int(x) for x in input().split())
a = set(int(eval(input())) for _ in range(M))
dp = [0] * N
broke = False
if N == 1:
    print('1')
    broke = True
elif 1 in a and 2 not in a:
    dp[1] = 1
elif 1 not in a and 2 in a:
    dp[0] = 1
else:
    dp[0] = 1
    dp[1] = 2
if 1 in a and 2 in a:
    print('0')
    broke = True
else:
    for i in range(3,N+1):
        if i-1 in a and i-2 in a:
            print('0')
            broke = True
            break
        elif i-1 in a:
            dp[i-1] = dp[i-3]
        elif i-2 in a:
            dp[i-1] = dp[i-2]
        else:
            dp[i-1] = (dp[i-2] + dp[i-3]) % 1000000007
if broke == False:
    print((dp[N-1]))
# Original solution
N, M = list(map(int, input().split(" ")))
A = {int(eval(input())) for _ in range(M)}

memo = [0] * (N + 1)
memo[0] = 0 if 0 in A else 1
memo[1] = 0 if 1 in A else 1

for i in range(2, N + 1):
    if i in A:
        continue
    memo[i] = memo[i - 2] + memo[i - 1]

print((memo[N] % 1000000007))

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

memo = [0] * (N + 1)
memo[0] = 1
memo[1] = 0 if 1 in A else 1

if N == 1:
    print((memo[1]))
else:
    for i in range(2, N + 1):
        if i in A:
            continue
        memo[i] = (memo[i - 2] + memo[i - 1]) % 1000000007

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

memo = [0] * (N + 1)
memo[0] = 1
memo[1] = 0 if 1 in A else 1

if N == 1:
    print((memo[1]))
else:
    for i in range(2, N + 1):
        if i in A:
            continue
        memo[i] = (memo[i - 2] + memo[i - 1]) % 1000000007

    print((memo[N]))


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

memo = [0] * (N + 1)
memo[0] = 1
memo[1] = 0 if 1 in A else 1

if N == 1:
    print((memo[1]))
else:
    for i in range(2, N + 1):
        if i in A:
            continue
        memo[i] = (memo[i - 2] + memo[i - 1]) % 1000000007
    print((memo[N]))
# Original solution
while True:
    try:
        N, M = list(map(int, input().split()))
        a = [int(eval(input())) for _ in range(M)]
        
        if (1 in a):
            f = [1, 0]
        else:
            f = [1, 1]
            
        for i in range(2, N+1):
            if i in a:
                f.append(0)
            else:
                f.append((f[i-1] + f[i-2])%1000000007)
        
        print((f[N]))
    except:
        break

# Optimized solution
mod = 1000000007

while True:
    try:
        N, M = list(map(int, input().split()))
        
        # check obstacles: O(1)
        a = [0] * (N+1)
        for _ in range(M):
            a[int(eval(input()))] = 1
        
        dp = [0] * (N+1)
        dp[0] = 1
        dp[1] = 0 if a[1] else 1
        
        for i in range(2, N+1):
            if a[i]:
                dp[i] = 0
            else:
                dp[i] = dp[i-1] + dp[i-2]
        
        print((dp[N] % mod))
    except:
        break
# Original solution
#!/usr/bin/env python3
import sys

sys.setrecursionlimit(1000000)


def count(n):
    if n < 2:
        return 1
    return count(n - 1) + count(n - 2)


n, m, *a = list(map(int, open(0).read().split()))
if sum(a[i + 1] == a[i] + 1 for i in range(m - 1)) > 0:
    print((0))
    exit()

a.append(n + 1)
c = -1
ans = 1
for i in a:
    ans = ans * count(i - c - 2) % (10**9 + 7)
    c = i
print(ans)


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

sys.setrecursionlimit(1000000)


memo = [0]*(10**5+1)
def count(n):
    if n < 2:
        return 1
    if memo[n] != 0:
        return memo[n]
    memo[n] = count(n-1) + count(n-2)
    return memo[n]


n, m, *a = list(map(int, open(0).read().split()))
if sum(a[i + 1] == a[i] + 1 for i in range(m - 1)) > 0:
    print((0))
    exit()

a.append(n + 1)
c = -1
ans = 1
for i in a:
    ans = ans * count(i - c - 2) % (10**9 + 7)
    c = i
print(ans)
# Original solution
#!/usr/bin/env python3
import sys

sys.setrecursionlimit(1000000)

n, m, *a = list(map(int, open(0).read().split()))
dp = [0] * (n + 1)
ok = [True] * (n + 1)

for i in a:
    ok[i] = False


def count(n):
    if ok[n]:
        if n < 2:
            return 1
        if dp[n] != 0:
            return dp[n]
        dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
        return dp[n]
    else:
        return 0


print((count(n)))


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

sys.setrecursionlimit(1000000)
n, m, *a = list(map(int, open(0).read().split()))
dp = [1] + [-1] * n
dp[1] = 1
for i in a:
    dp[i] = 0

def count(n):
    if dp[n] != -1:
        return dp[n]
    dp[n] = (count(n - 1) + count(n - 2)) % (10**9 + 7)
    return dp[n]


print((count(n)))
# Original solution
import math
n, m = list(map(int, input().split()))
p = []
pre = 0

def pattern_count(a,b):
    if a == 0 or b == 0:
        return 1
    else:
        return math.factorial(a+b)//(math.factorial(a)*math.factorial(b))

def count(a):
    ret = 0
    for i in range(a//2 + 1):
        ret += pattern_count(i, a-i*2)
    if ret == 0:
        return 1
    else:
        return ret

fault = False
for _ in range(m):
    a = int(eval(input()))
    if a == pre:
        fault = True
        break
    p.append(count(a-pre-1))
    pre = a+1

if fault:
    print((0))
else:
    p.append(count(n-pre))

    ans = 1
    for a in p:
        ans *= a

    print((ans % 1000000007))

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

hole_count = 0
pattern = [0,1]

if m != 0:
    a = int(eval(input()))
    hole_count += 1
else:
    a = n+1
    
for i in range(n):
    index = i + 1
    if index == a:
        pattern.append(0)
        if hole_count < m:
            a = int(eval(input()))
            hole_count += 1
    else:
        pattern.append(pattern[-1] + pattern[-2])

print((pattern[-1] % 1000000007))
# Original solution
from collections import defaultdict

N, M = [int(x) for x in input().split()]
a = []

for _ in range(M):
    a.append(int(eval(input())))

MOD = 1000000007

dict = defaultdict(int)

for i in range(M):
    if i >= 1 and a[i] - a[i - 1] == 1:
        print("0")
        exit()

dict[0] = 1
for i in range(N):
    if not i in a:
        dict[i + 1] += dict[i]
        dict[i + 2] += dict[i]
    else:
        a.pop(0)


print((dict[N] % MOD))




# Optimized solution
from collections import defaultdict

N, M = [int(x) for x in input().split()]
a = []

for _ in range(M):
    a.append(int(eval(input())))

MOD = 1000000007

dict = defaultdict(int)

for i in range(M):
    if i >= 1 and a[i] - a[i - 1] == 1:
        print("0")
        exit()

dict[0] = 1
a_s = set(a)
for i in range(N):
    if not i in a_s:
        dict[i + 1] += dict[i]
        dict[i + 2] += dict[i]


print((dict[N] % MOD))
# Original solution
from collections import defaultdict

N, M = [int(x) for x in input().split()]
a = []

for _ in range(M):
    a.append(int(eval(input())))

MOD = 1000000007

stair_list = [0] * (N + 2)

stair_list[0] = 1
a_s = set(a)
for i in range(N):
    if not i in a_s:
        stair_list[i + 1] += stair_list[i]
        stair_list[i + 2] += stair_list[i]


print((stair_list[N] % MOD))




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

aset = set(A)
MOD = 10 ** 9 + 7

dp = [0] * (N + 1)

if 1 not in aset:
    dp[1] = 1

if 2 not in aset and N >= 2:
    dp[2] += dp[1] + 1

for i in range(3, N + 1):
    if i in aset:
        continue

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

print((dp[N] % MOD))
# Original solution
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

MOD = int(1e9) + 7

N, M = list(map(int, input().split()))
a = [True]*(N+1)

for i in range(1, M+1):
    n = int(eval(input()))
    a[n] = False

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


# Optimized solution
MOD = int(1e9) + 7

N, M = list(map(int, input().split()))
a = [True]*(N+1)

for _ in range(1, M+1):
    n = int(eval(input()))
    a[n] = False

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