from sys import stdin

import bisect



n,m = [int(x) for x in stdin.readline().rstrip().split()]

if m == 0:

    li = [0]

else:

    li = [int(stdin.readline().rstrip()) for _ in range(m)]



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



dp[0] = 1



if li[0] == 1:

    dp[1] = 0

else:

    dp[1] = 1



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

    if li[bisect.bisect_right(li,i)-1] == i:

        dp[i] = 0

    else:

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



print((dp[n]%(10**9+7)))
n,m = list(map(int,input().split()))

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



now = 0

point = 1

mod = 10**9+7



def fib(n,mod):

    a, b = 1, 1

    for _ in range(n):

        a, b = b %mod, (a + b)%mod

    return a%mod



for i in range(1,m):

    if a[i-1]+1 == a[i]:

        print((0))

        exit()



for i in a:

    point *= fib((i-1-now),mod)

    point %= mod

    now = i+1

    if now == n:

        break



point *= fib(n-now,mod)

point %= mod



print(point)
from sys import stdin
import bisect

n, m = [int(x) for x in stdin.readline().rstrip().split()]
if m == 0:
    li = [0]
else:
    li = [int(stdin.readline().rstrip()) for _ in range(m)]
dp = [-1] * (n + 1)
dp[0] = 1
if li[0] == 1:
    dp[1] = 0
else:
    dp[1] = 1
for i in range(2, n + 1):
    if li[bisect.bisect_right(li, i) - 1] == i:
        dp[i] = 0
    else:
        dp[i] = dp[i - 1] + dp[i - 2]
print((dp[n] % (10**9 + 7)))

n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
now = 0
point = 1
mod = 10**9 + 7


def fib(n, mod):
    a, b = 1, 1
    for _ in range(n):
        a, b = b % mod, (a + b) % mod
    return a % mod


for i in range(1, m):
    if a[i - 1] + 1 == a[i]:
        print((0))
        exit()
for i in a:
    point *= fib((i - 1 - now), mod)
    point %= mod
    now = i + 1
    if now == n:
        break
point *= fib(n - now, mod)
point %= mod
print(point)

-from sys import stdin -import bisect +n, m = list(map(int, input().split())) +a = [int(eval(input())) for _ in range(m)] +now = 0 +point = 1 +mod = 10**9 + 7 -n, m = [int(x) for x in stdin.readline().rstrip().split()] -if m == 0: -    li = [0] -else: -    li = [int(stdin.readline().rstrip()) for _ in range(m)] -dp = [-1] * (n + 1) -dp[0] = 1 -if li[0] == 1: -    dp[1] = 0 -else: -    dp[1] = 1 -for i in range(2, n + 1): -    if li[bisect.bisect_right(li, i) - 1] == i: -        dp[i] = 0 -    else: -        dp[i] = dp[i - 1] + dp[i - 2] -print((dp[n] % (10**9 + 7))) + +def fib(n, mod): +    a, b = 1, 1 +    for _ in range(n): +        a, b = b % mod, (a + b) % mod +    return a % mod + + +for i in range(1, m): +    if a[i - 1] + 1 == a[i]: +        print((0)) +        exit() +for i in a: +    point *= fib((i - 1 - now), mod) +    point %= mod +    now = i + 1 +    if now == n: +        break +point *= fib(n - now, mod) +point %= mod +print(point)