import sys

sys.setrecursionlimit(10 ** 7)

input = sys.stdin.readline

p = 10**9 + 7



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

A = list(int(eval(input())) for i in range(m))

isHole = [False]*(n+1)





dp = [1]*(n+1)



for a in A:

    isHole[a] = True

    dp[a] = 0





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

    if isHole[i] == False:

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



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

sys.setrecursionlimit(10 ** 7)

input = sys.stdin.readline

p=10**9+7

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

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



safe = [1]*(n+1)

for aa in a:

    safe[aa]=0



dp = [0]*(n+1)

dp[0] = 1



if safe[1]:dp[1]=1



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

    if not safe[i]:

        continue



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



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

sys.setrecursionlimit(10**7)
input = sys.stdin.readline
p = 10**9 + 7
n, m = list(map(int, input().split()))
A = list(int(eval(input())) for i in range(m))
isHole = [False] * (n + 1)
dp = [1] * (n + 1)
for a in A:
    isHole[a] = True
    dp[a] = 0
for i in range(2, n + 1):
    if isHole[i] == False:
        dp[i] = dp[i - 2] % p + dp[i - 1] % p
print((dp[-1] % p))

import sys

sys.setrecursionlimit(10**7)
input = sys.stdin.readline
p = 10**9 + 7
n, m = list(map(int, input().split()))
a = list(int(eval(input())) for i in range(m))
safe = [1] * (n + 1)
for aa in a:
    safe[aa] = 0
dp = [0] * (n + 1)
dp[0] = 1
if safe[1]:
    dp[1] = 1
for i in range(2, n + 1):
    if not safe[i]:
        continue
    dp[i] = dp[i - 1] % p + dp[i - 2] % p
print((dp[-1] % p))

-A = list(int(eval(input())) for i in range(m)) -isHole = [False] * (n + 1) -dp = [1] * (n + 1) -for a in A: -    isHole[a] = True -    dp[a] = 0 +a = list(int(eval(input())) for i in range(m)) +safe = [1] * (n + 1) +for aa in a: +    safe[aa] = 0 +dp = [0] * (n + 1) +dp[0] = 1 +if safe[1]: +    dp[1] = 1 -    if isHole[i] == False: -        dp[i] = dp[i - 2] % p + dp[i - 1] % p +    if not safe[i]: +        continue +    dp[i] = dp[i - 1] % p + dp[i - 2] % p