# -*- coding: utf-8 -*-

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

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



inf=float("inf")



fib_memo = [-inf for i in range(n+1)]

fib_memo[0] = 1

if 1 in a:

    fib_memo[1]=0

else:

    fib_memo[1]=1

for i in a:

    fib_memo[i]=0



if 1 in [a[i] - a[i-1] for i in range(1,m)]:

    print((0))

    import sys

    sys.exit()

else:

    cur_fib_i = 2

    while cur_fib_i <= n:

        if fib_memo[cur_fib_i]==0:

            pass

        else:

            fib_memo[cur_fib_i] = fib_memo[cur_fib_i-1] + fib_memo[cur_fib_i-2]

        cur_fib_i += 1

print((fib_memo[n]%1000000007))

#print(fib_memo)

# -*- coding: utf-8 -*-

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

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



from collections import deque

stack_deque = deque(a)



def pl():

    try:

        return stack_deque.popleft()

    except:

        return -1



MOD = 10**9+7

#i段目への移動方法

dp = [0] * (n+1)

dp[0]=1

min_a = pl()

if min_a!=1:

    dp[1]=1

else:

    min_a = pl()

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

    if i == min_a:

        dp[i]=0

        min_a = pl()

    else:

        dp[i]=(dp[i-1]%MOD+dp[i-2]%MOD) % MOD

print((dp[-1]))
# -*- coding: utf-8 -*-
n, m = list(map(int, input().split()))
a = [int(eval(input())) for i in range(m)]
inf = float("inf")
fib_memo = [-inf for i in range(n + 1)]
fib_memo[0] = 1
if 1 in a:
    fib_memo[1] = 0
else:
    fib_memo[1] = 1
for i in a:
    fib_memo[i] = 0
if 1 in [a[i] - a[i - 1] for i in range(1, m)]:
    print((0))
    import sys

    sys.exit()
else:
    cur_fib_i = 2
    while cur_fib_i <= n:
        if fib_memo[cur_fib_i] == 0:
            pass
        else:
            fib_memo[cur_fib_i] = fib_memo[cur_fib_i - 1] + fib_memo[cur_fib_i - 2]
        cur_fib_i += 1
print((fib_memo[n] % 1000000007))
# print(fib_memo)

# -*- coding: utf-8 -*-
n, m = list(map(int, input().split()))
a = [int(eval(input())) for i in range(m)]
from collections import deque

stack_deque = deque(a)


def pl():
    try:
        return stack_deque.popleft()
    except:
        return -1


MOD = 10**9 + 7
# i段目への移動方法
dp = [0] * (n + 1)
dp[0] = 1
min_a = pl()
if min_a != 1:
    dp[1] = 1
else:
    min_a = pl()
for i in range(2, n + 1):
    if i == min_a:
        dp[i] = 0
        min_a = pl()
    else:
        dp[i] = (dp[i - 1] % MOD + dp[i - 2] % MOD) % MOD
print((dp[-1]))

-inf = float("inf") -fib_memo = [-inf for i in range(n + 1)] -fib_memo[0] = 1 -if 1 in a: -    fib_memo[1] = 0 +from collections import deque + +stack_deque = deque(a) + + +def pl(): +    try: +        return stack_deque.popleft() +    except: +        return -1 + + +MOD = 10**9 + 7 +# i段目への移動方法 +dp = [0] * (n + 1) +dp[0] = 1 +min_a = pl() +if min_a != 1: +    dp[1] = 1 -    fib_memo[1] = 1 -for i in a: -    fib_memo[i] = 0 -if 1 in [a[i] - a[i - 1] for i in range(1, m)]: -    print((0)) -    import sys - -    sys.exit() -else: -    cur_fib_i = 2 -    while cur_fib_i <= n: -        if fib_memo[cur_fib_i] == 0: -            pass -        else: -            fib_memo[cur_fib_i] = fib_memo[cur_fib_i - 1] + fib_memo[cur_fib_i - 2] -        cur_fib_i += 1 -print((fib_memo[n] % 1000000007)) -# print(fib_memo) +    min_a = pl() +for i in range(2, n + 1): +    if i == min_a: +        dp[i] = 0 +        min_a = pl() +    else: +        dp[i] = (dp[i - 1] % MOD + dp[i - 2] % MOD) % MOD +print((dp[-1]))