CodeEff/ECCO huggingface dataset:
# Original solution
N, M = list(map(int, input().split()))

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

val = [0,1]
for i in range(1, N + 1):
    ans = val[0] + val[1]
    val[0] = val[1]
    val[1] = ans
    if len(a) > 0:
        if i == a[0]:
            val[1] = 0
            a.pop(0)

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

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

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

val = [0,1]
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % (10**9 +7)
    val[0] = val[1]
    val[1] = ans
    if len(a) > 0:
        if i == a[0]:
            val[1] = 0
            a.pop(0)

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

mod_num = 10 ** 9 + 7
a = [0] * N

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

val = [0,1]
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % mod_num
    val[0] = val[1]
    val[1] = ans
    if len(a) > 0:
        if i == a[0]:
            val[1] = 0
            a.pop(0)
 
print(ans)

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

mod_num = 10 ** 9 + 7
a = [0] * N

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

val = [0,1]
j = 0
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % mod_num
    val[0] = val[1]
    val[1] = ans
    if len(a) > 0:
        if i == a[j]:
            val[1] = 0
            if len(a) - 1 != j:
                j += 1
 
print(ans)
# Original solution
N, M = list(map(int, input().split()))

mod_num = 10 ** 9 + 7
a = [0] * M

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

val = [0,1]
j = 0
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % mod_num
    val[0] = val[1]
    val[1] = ans
    if i in a:
        val[1] = 0

 
print(ans)

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

mod_num = 10 ** 9 + 7
a = [0] * M

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

val = [0,1]
j = 0
for i in range(1, N + 1):
    ans = (val[0] + val[1]) % mod_num
    val[0] = val[1]
    val[1] = ans
    if i in a:
        val[1] = 0

 
print(ans)
# Original solution
#https://atcoder.jp/contests/abc129/tasks/abc129_c

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

def main():
    n, m= list(map(int, input().split()))
    a = [int(eval(input())) for _ in range(m)]    
    print((dp1(n,a)%1000000007))

main()

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

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

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

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

mod = 10**9+7
dp = [0]*(n+1)
dp[0]=1
if 1 not in a:
    dp[1]=1
for i in range(2,n+1):
    if i in a :
        continue
    else:
        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 = 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
    else:
        dp[i]= dp[i-1] + dp[i-2]
        dp[i]%= mod


print((dp[n]))
# Original solution
n,m=list(map(int,input().split()))
L=[int(eval(input())) for i in range(m)]
 
NL=[0]*(n+1)
NL[0],NL[1]=1,1
 
if 1 in L:
      NL[1]=0
      
for i in range(2,n+1):
      if i in L:
            NL[i]=0
      else:
            NL[i]=NL[i-2]+NL[i-1]
          
if NL[-1]>=1000000007:
  print((NL[-1]%1000000007))
else:
  print((NL[-1]))

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

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

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

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

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

for i in range(2,n+1):
   if i not in A:
      dp[i]=dp[i-1]+dp[i-2]
print((dp[-1]%mod))
# Original solution
def fib(n):
    if n <= 1:
        return n
    result = [1, 0, 0, 1]
    matrix = [1, 1, 1, 0]
    while n > 0:
        if n % 2:
            result = mul(matrix, result)
        matrix = mul(matrix, matrix)
        n //= 2
    return result[2]

def mul(a, b):
    return [a[0]*b[0] + a[1]*b[2],
            a[0]*b[1] + a[1]*b[3],
            a[2]*b[0] + a[3]*b[2],
            a[2]*b[1] + a[3]*b[3]]
    
N, M = list(map(int, input().split()))
if N == 1:
    print((1))
    quit()
S = [-1]
for i in range(M):
    S.append(int(eval(input())))
S.append(N + 1)
S = [S[i + 1] - S[i] for i in range(M + 1)]
if any([x == 1 for x in S]):
    print((0))
    exit()
num = 1
for x in S:
    num *=  fib(x - 1)
    num = num % 1000000007
print(num)

# Optimized solution
N, M = list(map(int, input().split()))
if N == 1:
    print((1))
    quit()
S = [-1] * (N + 1)
S[0] = 1
for i in range(M):
    S[int(eval(input()))] = 0
if S[1] != 0:
    S[1] = 1
for i in range(2, N + 1):
    if S[i] == 0:
        continue
    else:
        S[i] = (S[i - 1] + S[i - 2]) % 1000000007
        if S[i] == 0:
            print((0))
            quit()
print((S[N]))
# Original solution
n,m=list(map(int,input().split()))
a=[]
for i in range(m):
    a.append(int(eval(input())))
dp=[0]*n
if 1 not in a:
    dp[0]=1
else:
    dp[0]=0
for i in range(1,n):
    if i+1 in a:
        continue
    if i==1:
        dp[i]=dp[i-1]+1
        continue
    dp[i]=dp[i-1]+dp[i-2]
print((dp[-1]%((10**9)+7)))

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

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

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

C = [0]*(N+1)
C[0]=1
#print(C)
for i in range(N):
    if i+1 not in A:
        C[i+1]+=C[i]%MOD
    if i+2 not in A and i<N-1:
        C[i+2]+=C[i]%MOD
    #print(C)
print((C[N]%MOD))


# Optimized solution
N, M = list(map(int, input().split()))
D=[1]*(N+1)
MOD=1000000007
for _ in range(M):
    i = int(eval(input()))
    D[i]=0

C = [0]*(N+1)
C[0]=1
for i in range(N-1):
    C[i+1]+=(C[i]*D[i])%MOD
    C[i+2]+=(C[i]*D[i])%MOD
C[N]+=(C[N-1]*D[N-1])%MOD
    #print(C)
print((C[N]%MOD))
# Original solution
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,M = LI()
a = set([I() for _ in range(M)])
if N==1:
    print((1))
    exit()
dp = [0]*(N+1) #1_indexed
dp[1] = 0 if 1 in a else 1
dp[2] = 0 if 2 in a else (1+dp[1])
for i in range(3,N+1):
    if i in a:
        dp[i] = 0
        continue
    dp[i] = (dp[i-2]+dp[i-1])%1000000007
print((dp[-1]))


# Optimized solution
import itertools,sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,M = LI()
a = set([I() for _ in range(M)])
dp = [0]*(N+1) #1_indexed
dp[0] = 1
dp[1] = 0 if 1 in a else 1
for i in range(1,N+1):
    if i in a:
        dp[i] = 0
        continue
    if i-2>=0:
        dp[i] = (dp[i-1]+dp[i-2])%(10**9+7)
print((dp[-1]))
# Original solution
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,M = LI()
a = [I() for _ in range(M)]
dp = [0]*(N+1) #1_indexed
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
        continue
    dp[i] = dp[i-1]+dp[i-2]
    dp[i] %= 10**9+7
print((dp[-1]))


# Optimized solution
import itertools,sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
N,M = LI()
a = set([I() for _ in range(M)])
dp = [0]*(N+1) #1_indexed
dp[0] = 1
dp[1] = 0 if 1 in a else 1
for i,j in itertools.product(list(range(2,N+1)),[1,2]):
    if i in a:
        dp[i] = 0
        continue
    dp[i] += dp[i-j]
    dp[i] %= 10**9+7
print((dp[-1]))
# 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],dp[1] = 1,1
for i in range(2,n+1):
    if i in A:
        continue
    elif i-1 in A and i-2 in A:
        dp[n] = 0
        break
    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[n]%mod))

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

# 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
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]))
# Original solution
N, M = list(map(int,input().split()))
a = [int(eval(input())) for i in range(M)]
dp = [0 for i in range(N+1)]
dp[0] = 1
dp[1] = 1
for i in range(2,N+1):
  if (i-2 in a) and (i-1 in a):
    dp[-1] = 0
    break
  elif i-2 in a:
    dp[i] = dp[i-1]
  elif i-1 in a:
    dp[i] = dp[i-2]
  else:
    dp[i] = dp[i-1] + dp[i-2]

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

# Optimized solution
N, M = list(map(int,input().split()))
a = set([int(eval(input())) for i in range(M)])
dp = [0 for i in range(N+1)]
dp[0] = 1
dp[1] = 1
for i in range(2,N+1):
  if (i-2 in a) and (i-1 in a):
    dp[-1] = 0
    break
  elif i-2 in a:
    dp[i] = dp[i-1]
  elif i-1 in a:
    dp[i] = dp[i-2]
  else:
    dp[i] = dp[i-1] + dp[i-2]

print((dp[-1]%(7+10**9)))
# Original solution
N, M =  list(map(int, input().split()))
a_list = [int(eval(input())) for _ in range(M)]
ans_list = [1] + [0] * N

for i in range(1, N+1):
    if i == 1:
        if 1 not in a_list:
            ans_list[1] += ans_list[i-1]
    else:
        if i not in a_list:
            ans_list[i] += ans_list[i-2]
            ans_list[i] += ans_list[i-1]

print((int(ans_list[-1]%1000000007)))

# Optimized solution
import sys

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

if N == 1:
    print((1))

else:
    a = 1
    ans = 1

    if M == 0:
        b = 1
        for i in range(2, N+1):
            ans = (a+b)%1000000007
            a, b = b, ans

    elif M == 1:
        if a_list[0] == 1:
            b = 0
            m = 1
        else:
            b = 1
            m = 0
        for i in range(2, N+1):
            if a_list[0] == i:
                a, b = b, 0
            else:
                ans = (a+b)%1000000007
                a, b = b, ans

    else:
        if a_list[0] == 1:
            b = 0
            m = 1
        else:
            b = 1
            m = 0
        for i in range(2, N+1):
            if m < M-1:
                if a_list[m+1] - a_list[m] == 1:
                    print((0))
                    sys.exit()

                if a_list[m] == i:
                    a, b = b, 0
                    m += 1
                else:
                    ans = (a+b)%1000000007
                    a, b = b, ans

            else:
                if a_list[m] == i:
                    a, b = b, 0
                else:
                    ans = (a+b)%1000000007
                    a, b = b, ans

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

# Optimized solution
n,m=list(map(int,input().split()))
a=[int(eval(input())) for i in range(m)]
d=[1]*(n+1)
for i in range(m):
  d[a[i]]=0
for i in range(2,n+1):
  if d[i]!=0:
    d[i]=d[i-1]+d[i-2]
print((d[n]%(10**9+7)))
# Original solution
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    p,q,r = LI()
    print((p+q+r-max(p,q,r)))
    return

#B
def B():
    n = I()
    w = LI()
    ans = float("inf")
    for i in range(n):
        m = sum(w[:i])
        l = sum(w[i:])
        ans = min(ans,abs(m-l))
    print(ans)
    return

#C
def C():
    n,m = LI()
    f = defaultdict(lambda : 1)
    for i in range(m):
        a = I()
        f[a] = 0
    dp = defaultdict(int)
    dp[0] = 1
    for i in range(1,n+1):
        if f[i]:
            dp[i] = dp[i-1]+dp[i-2]
            dp[i] %= mod
    print((dp[n]))
    return

#D
def D():
    h,w = LI()
    s = SR(h)

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    C()


# Optimized solution
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    p,q,r = LI()
    print((p+q+r-max(p,q,r)))
    return

#B
def B():
    n = I()
    w = LI()
    ans = float("inf")
    for i in range(n):
        m = sum(w[:i])
        l = sum(w[i:])
        ans = min(ans,abs(m-l))
    print(ans)
    return

#C
def C():
    n,m = LI()
    f = defaultdict(lambda : 1)
    for i in range(m):
        a = I()
        f[a] = 0
    dp = defaultdict(lambda : 0)
    dp[0] = 1

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

#D
def D():
    h,w = LI()
    s = SR(h)

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    C()
# Original solution
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    p,q,r = LI()
    print((p+q+r-max(p,q,r)))
    return

#B
def B():
    n = I()
    w = LI()
    ans = float("inf")
    for i in range(n):
        m = sum(w[:i])
        l = sum(w[i:])
        ans = min(ans,abs(m-l))
    print(ans)
    return

#C
def C():
    n,m = LI()
    f = defaultdict(lambda : 1)
    for i in range(m):
        a = I()
        f[a] = 0
    dp = defaultdict(lambda : 0)
    dp[0] = 1

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

#D
def D():
    h,w = LI()
    s = SR(h)

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    C()


# Optimized solution
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    p,q,r = LI()
    print((p+q+r-max(p,q,r)))
    return

#B
def B():
    n = I()
    w = LI()
    ans = float("inf")
    for i in range(n):
        m = sum(w[:i])
        l = sum(w[i:])
        ans = min(ans,abs(m-l))
    print(ans)
    return

#C
def C():
    n,m = LI()
    f = [1 for i in range(n+1)]
    for i in range(m):
        a = I()
        f[a] = 0
    dp = [0 for i in range(n+1)]
    dp[0] = 1
    for i in range(1,n+1):
        if f[i]:
            dp[i] = dp[i-1]+dp[i-2]
            dp[i] %= mod
    print((dp[n]))
    return

#D
def D():
    h,w = LI()
    s = SR(h)

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return

#Solve
if __name__ == "__main__":
    C()
# Original solution
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(eval(input()))
def MAP(): return list(map(int, input().split()))
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N,M=MAP()
broken=[False]*(N+1)
for i in range(M):
    a=INT()
    broken[a]=True

dp=[0]*(N+7)
dp[0]=1
for i in range(N):
    if not broken[i+1]:
        dp[i+1]+=dp[i]
        dp[i+1]%=MOD
    if i!=N-1 and not broken[i+2]:
        dp[i+2]+=dp[i]
        dp[i+2]%=MOD
print((dp[N]))


# Optimized solution
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(eval(input()))
def MAP(): return list(map(int, input().split()))
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N,M=MAP()
broken=[False]*(N+1)
for i in range(M):
    a=INT()
    broken[a]=True

dp=[0]*(N+1)
dp[0]=1
for i in range(N):
    if not broken[i+1]:
        dp[i+1]+=dp[i]
        dp[i+1]%=MOD
    if i!=N-1:
        if not broken[i+2]:
            dp[i+2]+=dp[i]
            dp[i+2]%=MOD
print((dp[N]))
# Original solution
def readinput():
    n,m=list(map(int,input().split()))
    a=[]
    for _ in range(m):
        a.append(int(eval(input())))
    return n,a

def main(n,a):
    MOD=10**9+7

    nroute=[0]*(n+2)
    nroute[0]=0
    nroute[1]=1
    nroute[2]=1
    for i in range(3,n+2):
        nroute[i]=(nroute[i-1]+nroute[i-2])%MOD
    #print(nroute)
    
    subn=[]
    i=0
    for j in a:
        subn.append((i,j-1))
        i=j+1
    subn.append((i,n))
    #print(subn)

    nways=1
    for i,j in subn:
        l=j-i+1
        nways=nways*nroute[l]%MOD

    return nways

if __name__=='__main__':
    n,a=readinput()
    ans=main(n,a)
    print(ans)



# Optimized solution
import sys
INFTY=sys.maxsize

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

def main(n,m,a):
    MOD=10**9+7
    dp=[0]*(n+3)
    dp[0]=1
    ia=0
    for i in range(n+1):
        if ia<m and i==a[ia]:
            ia+=1
            #print(ia)
            continue
        dp[i+1]=(dp[i+1]+dp[i])%MOD
        dp[i+2]=(dp[i+2]+dp[i])%MOD
        #print(dp)
    return dp[n]

if __name__=='__main__':
    n,m,a=readinput()
    ans=main(n,m,a)
    print(ans)
# Original solution
n,m=list(map(int,input().split()))
A=[int(eval(input())) for i in [0]*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
import sys
MOD = 10**9 + 7
n, m = list(map(int, input().split()))
a = [int(x) for x in sys.stdin.readlines()]
ans = [0 for i in range(n)]
if 1 not in a:
    ans[0] = 1
if 2 not in a and n >=2:
    ans[1] = ans[0] + 1

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

print((ans[-1]))

# Optimized solution
import sys
MOD = 10**9 + 7
n, m = list(map(int, input().split()))
a = [int(x) for x in sys.stdin.readlines()]
ans = [1 for i in range(n)]
for x in a:
    ans[x-1] = 0
for i in range(n):
    if i == 0 and ans[i] == 0:
        ans[0] = 0
    elif i == 1:
        if ans[i] == 1:
            ans[1] += ans[0]
        elif ans[i] == 0:
            ans[1] = 0
    elif i >= 2 and ans[i] == 1:
        ans[i] = (ans[i-1] + ans[i-2])%MOD

print((ans[-1]))