





mod=10**9+7

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

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

fib=[1,1]

c=0

if m>0 and a[0]==1:

    fib[1]=0

    c+=1

for i in range(2,n+1):

    if c<m and a[c]==i:

        fib.append(0)

        c+=1

    else:

        fib.append((fib[i-2]+fib[i-1])%mod)



print((fib[n]))
from collections import Counter 

from collections import defaultdict

from collections import deque

import math

import itertools

import heapq

import sys

sys.setrecursionlimit(10**6)



#n=int(input())

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

#a=list(map(int,input().split()))

input_list = lambda : list(map(int,input().split()))



n,m=input_list()

c=[True for _ in range(n+1)]

mod=10**9+7



for _ in range(m):

    num=int(eval(input()))

    c[num]=False



fib=[1,1]

if not c[1]:

    fib[1]=0



for i in range(2,n+1):

    if c[i]:

        fib.append((fib[i-1]+fib[i-2])%mod)

    else:

        fib.append(0)





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

        





mod = 10**9 + 7
n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
fib = [1, 1]
c = 0
if m > 0 and a[0] == 1:
    fib[1] = 0
    c += 1
for i in range(2, n + 1):
    if c < m and a[c] == i:
        fib.append(0)
        c += 1
    else:
        fib.append((fib[i - 2] + fib[i - 1]) % mod)
print((fib[n]))

from collections import Counter
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys

sys.setrecursionlimit(10**6)
# n=int(input())
# n,m=list(map(int,input().split()))
# a=list(map(int,input().split()))
input_list = lambda: list(map(int, input().split()))
n, m = input_list()
c = [True for _ in range(n + 1)]
mod = 10**9 + 7
for _ in range(m):
    num = int(eval(input()))
    c[num] = False
fib = [1, 1]
if not c[1]:
    fib[1] = 0
for i in range(2, n + 1):
    if c[i]:
        fib.append((fib[i - 1] + fib[i - 2]) % mod)
    else:
        fib.append(0)
print((fib[-1] % mod))

+from collections import Counter +from collections import defaultdict +from collections import deque +import math +import itertools +import heapq +import sys + +sys.setrecursionlimit(10**6) +# n=int(input()) +# n,m=list(map(int,input().split())) +# a=list(map(int,input().split())) +input_list = lambda: list(map(int, input().split())) +n, m = input_list() +c = [True for _ in range(n + 1)] -n, m = list(map(int, input().split())) -a = [int(eval(input())) for _ in range(m)] +for _ in range(m): +    num = int(eval(input())) +    c[num] = False -c = 0 -if m > 0 and a[0] == 1: +if not c[1]: -    c += 1 -    if c < m and a[c] == i: +    if c[i]: +        fib.append((fib[i - 1] + fib[i - 2]) % mod) +    else: -        c += 1 -    else: -        fib.append((fib[i - 2] + fib[i - 1]) % mod) -print((fib[n])) +print((fib[-1] % mod))