import sys

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

A = [int(eval(input())) for _ in range(M)]

mod = 10 ** 9 + 7



if N == 1:

    print((1))

    sys.exit()



B = ['.'] * (N + 1) 

for a in A:

    B[a] = '#'

    

dp = [0] * (N + 1)

if B[1] == '.' and B[2] == '.':

    dp[1] = 1

    dp[2] = 2

elif B[1] == '#' and B[2] == '.':

    dp[2] = 1

elif B[1] == '.' and B[2] == '#':

    dp[1] = 1

    

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

    if B[i] == '.':

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

    

print((dp[N]))
import sys

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

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

mod = 1000000007



if n == 1:

    print((1))

    sys.exit()



B = ['.'] * (n + 1)

for a in A:

    B[a] = '#'

    

dp = [0] * (n + 1)

if B[1] == '.' and B[2] == '.':

    dp[1] = 1

    dp[2] = 2

elif B[1] == '#' and B[2] == '.':

    dp[2] = 1

elif B[1] == '.' and B[2] == '#':

    dp[1] = 1

    

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

    if B[i] == '.':

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

    

print((dp[-1]))
import sys

N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
mod = 10**9 + 7
if N == 1:
    print((1))
    sys.exit()
B = ["."] * (N + 1)
for a in A:
    B[a] = "#"
dp = [0] * (N + 1)
if B[1] == "." and B[2] == ".":
    dp[1] = 1
    dp[2] = 2
elif B[1] == "#" and B[2] == ".":
    dp[2] = 1
elif B[1] == "." and B[2] == "#":
    dp[1] = 1
for i in range(3, N + 1):
    if B[i] == ".":
        dp[i] = (dp[i - 2] + dp[i - 1]) % mod
print((dp[N]))

import sys

n, m = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(m)]
mod = 1000000007
if n == 1:
    print((1))
    sys.exit()
B = ["."] * (n + 1)
for a in A:
    B[a] = "#"
dp = [0] * (n + 1)
if B[1] == "." and B[2] == ".":
    dp[1] = 1
    dp[2] = 2
elif B[1] == "#" and B[2] == ".":
    dp[2] = 1
elif B[1] == "." and B[2] == "#":
    dp[1] = 1
for i in range(3, n + 1):
    if B[i] == ".":
        dp[i] = (dp[i - 2] + dp[i - 1]) % mod
print((dp[-1]))

-N, M = list(map(int, input().split())) -A = [int(eval(input())) for _ in range(M)] -mod = 10**9 + 7 -if N == 1: +n, m = list(map(int, input().split())) +A = [int(eval(input())) for _ in range(m)] +mod = 1000000007 +if n == 1: -B = ["."] * (N + 1) +B = ["."] * (n + 1) -dp = [0] * (N + 1) +dp = [0] * (n + 1) -for i in range(3, N + 1): +for i in range(3, n + 1): -print((dp[N])) +print((dp[-1]))