

# 壊れている床を無視すればフィボナッチ数になってる

from collections import defaultdict



def Fib(n, broken):

    dd = defaultdict(int)



    dd[0] = 1

    dd[1] = 1



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

        if broken[i-1] == 0:

            dd[i] += dd[i-1]

        if broken[i-2] == 0:

            dd[i] += dd[i-2]



    return dd[n]





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

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

broken = defaultdict(int)

for c in A:

    broken[c] = 1



ans = Fib(n, broken)

print((ans % 1000000007))


import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**6)

##############################



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

A = [0] * M

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



for i in range(M):

    a = int(eval(input()))

    dp[a] = 0



dp[0] = 1

if dp[1] != 0:

    dp[1] = 1



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

    if dp[i] != 0:

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



print((dp[N] % 1000000007))
# 壊れている床を無視すればフィボナッチ数になってる
from collections import defaultdict


def Fib(n, broken):
    dd = defaultdict(int)
    dd[0] = 1
    dd[1] = 1
    for i in range(2, n + 1):
        if broken[i - 1] == 0:
            dd[i] += dd[i - 1]
        if broken[i - 2] == 0:
            dd[i] += dd[i - 2]
    return dd[n]


n, m = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(m)]
broken = defaultdict(int)
for c in A:
    broken[c] = 1
ans = Fib(n, broken)
print((ans % 1000000007))

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################
N, M = list(map(int, input().split()))
A = [0] * M
dp = [-1] * (N + 1)
for i in range(M):
    a = int(eval(input()))
    dp[a] = 0
dp[0] = 1
if dp[1] != 0:
    dp[1] = 1
for i in range(2, N + 1):
    if dp[i] != 0:
        dp[i] = dp[i - 1] + dp[i - 2]
print((dp[N] % 1000000007))

-# 壊れている床を無視すればフィボナッチ数になってる -from collections import defaultdict +import sys - -def Fib(n, broken): -    dd = defaultdict(int) -    dd[0] = 1 -    dd[1] = 1 -    for i in range(2, n + 1): -        if broken[i - 1] == 0: -            dd[i] += dd[i - 1] -        if broken[i - 2] == 0: -            dd[i] += dd[i - 2] -    return dd[n] - - -n, m = list(map(int, input().split())) -A = [int(eval(input())) for _ in range(m)] -broken = defaultdict(int) -for c in A: -    broken[c] = 1 -ans = Fib(n, broken) -print((ans % 1000000007)) +input = sys.stdin.readline +sys.setrecursionlimit(10**6) +############################## +N, M = list(map(int, input().split())) +A = [0] * M +dp = [-1] * (N + 1) +for i in range(M): +    a = int(eval(input())) +    dp[a] = 0 +dp[0] = 1 +if dp[1] != 0: +    dp[1] = 1 +for i in range(2, N + 1): +    if dp[i] != 0: +        dp[i] = dp[i - 1] + dp[i - 2] +print((dp[N] % 1000000007))