n,m,*a=list(map(int,open(0).read().split()))

a=set(a)

dp=[0]*(n+2)

dp[0]=1

div=1000000007

for i in range(n):

  dp[i]%=div

  if i+1 in a:

    dp[i+1]=0

  else:

    dp[i+1]+=dp[i]

  if i+2 in a:

    dp[i+2]=0

  else:

    dp[i+2]+=dp[i]

print((dp[n]%div))
import sys

readline = sys.stdin.readline



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



broken = set([int(readline()) for i in range(M)])



dp = [0] * (N + 1)

dp[0] = 1

if 1 not in broken:

  dp[1] = 1

  

DIV = 10 ** 9 + 7



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

  if i in broken:

    continue

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

  dp[i] %= DIV

  

print((dp[N]))
n, m, *a = list(map(int, open(0).read().split()))
a = set(a)
dp = [0] * (n + 2)
dp[0] = 1
div = 1000000007
for i in range(n):
    dp[i] %= div
    if i + 1 in a:
        dp[i + 1] = 0
    else:
        dp[i + 1] += dp[i]
    if i + 2 in a:
        dp[i + 2] = 0
    else:
        dp[i + 2] += dp[i]
print((dp[n] % div))

import sys

readline = sys.stdin.readline
N, M = list(map(int, readline().split()))
broken = set([int(readline()) for i in range(M)])
dp = [0] * (N + 1)
dp[0] = 1
if 1 not in broken:
    dp[1] = 1
DIV = 10**9 + 7
for i in range(2, N + 1):
    if i in broken:
        continue
    dp[i] = dp[i - 2] + dp[i - 1]
    dp[i] %= DIV
print((dp[N]))

-n, m, *a = list(map(int, open(0).read().split())) -a = set(a) -dp = [0] * (n + 2) +import sys + +readline = sys.stdin.readline +N, M = list(map(int, readline().split())) +broken = set([int(readline()) for i in range(M)]) +dp = [0] * (N + 1) -div = 1000000007 -for i in range(n): -    dp[i] %= div -    if i + 1 in a: -        dp[i + 1] = 0 -    else: -        dp[i + 1] += dp[i] -    if i + 2 in a: -        dp[i + 2] = 0 -    else: -        dp[i + 2] += dp[i] -print((dp[n] % div)) +if 1 not in broken: +    dp[1] = 1 +DIV = 10**9 + 7 +for i in range(2, N + 1): +    if i in broken: +        continue +    dp[i] = dp[i - 2] + dp[i - 1] +    dp[i] %= DIV +print((dp[N]))