import sys
pin=sys.stdin.readline
sys.setrecursionlimit(10000000)

def f(n):
  if n==0:
    return 1
  if n==1:
    if dp[n]==0:
      return 0
    return 1
  if dp[n]==0:
    return 0
  if dp[n-1]==-1:
    dp[n-1]=f(n-1)
  if dp[n-2]==-1:
    dp[n-2]=f(n-2)
  return dp[n-1]+dp[n-2]


N,M=map(int,pin().split())
mod=1000000007
dp=[-1]*(N+1)
dp[0]=1
for i in range(M):
  dp[int(pin())]=0
print(f(N)%mod) import sys sys pin=sys.stdin.readline pin sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10000000) sys.setrecursionlimit sys setrecursionlimit 10000000 def f(n):
  if n==0:
    return 1
  if n==1:
    if dp[n]==0:
      return 0
    return 1
  if dp[n]==0:
    return 0
  if dp[n-1]==-1:
    dp[n-1]=f(n-1)
  if dp[n-2]==-1:
    dp[n-2]=f(n-2)
  return dp[n-1]+dp[n-2] f if n==0:
    return 1
   n==0 n 0 return 1 1 if n==1:
    if dp[n]==0:
      return 0
    return 1
   n==1 n 1 if dp[n]==0:
      return 0
     dp[n]==0 dp[n] dp n 0 return 0 0 return 1 1 if dp[n]==0:
    return 0
   dp[n]==0 dp[n] dp n 0 return 0 0 if dp[n-1]==-1:
    dp[n-1]=f(n-1)
   dp[n-1]==-1 dp[n-1] dp n-1 n 1 -1 dp[n-1]=f(n-1) dp[n-1] dp n-1 n 1 f(n-1) f n-1 n 1 if dp[n-2]==-1:
    dp[n-2]=f(n-2)
   dp[n-2]==-1 dp[n-2] dp n-2 n 2 -1 dp[n-2]=f(n-2) dp[n-2] dp n-2 n 2 f(n-2) f n-2 n 2 return dp[n-1]+dp[n-2] dp[n-1]+dp[n-2] dp[n-1] dp n-1 n 1 dp[n-2] dp n-2 n 2 n n N,M=map(int,pin().split()) N map(int,pin().split()) map int pin().split() ().split () pin split M mod=1000000007 mod 1000000007 dp=[-1]*(N+1) dp [-1]*(N+1) [-1] -1 N+1 N 1 dp[0]=1 dp[0] dp 0 1 for i in range(M):
  dp[int(pin())]=0 i range(M) range M dp[int(pin())]=0 dp[int(pin())] dp int(pin()) int pin() pin 0 print(f(N)%mod) print f(N)%mod f(N) f N mod def f(n):
  if n==0:
    return 1
  if n==1:
    if dp[n]==0:
      return 0
    return 1
  if dp[n]==0:
    return 0
  if dp[n-1]==-1:
    dp[n-1]=f(n-1)
  if dp[n-2]==-1:
    dp[n-2]=f(n-2)
  return dp[n-1]+dp[n-2] def f(n):
  if n==0:
    return 1
  if n==1:
    if dp[n]==0:
      return 0
    return 1
  if dp[n]==0:
    return 0
  if dp[n-1]==-1:
    dp[n-1]=f(n-1)
  if dp[n-2]==-1:
    dp[n-2]=f(n-2)
  return dp[n-1]+dp[n-2] f dp=[-1]*(N+1) [-1]*(N+1) dp N,M=map(int,pin().split()) map(int,pin().split()) N mod=1000000007 1000000007 mod pin=sys.stdin.readline sys.stdin.readline pin M=map(int,pin().split()) map(int,pin().split()) M
import sys
pin=sys.stdin.readline
sys.setrecursionlimit(10000000)

def f(n):
  if n==0:
    return 1
  if n==1:
    if dp[n]==0:
      return 0
    return 1
  if dp[n]==0:
    return 0
  if dp[n-1]==-1:
    dp[n-1]=f(n-1)
  if dp[n-2]==-1:
    dp[n-2]=f(n-2)
  return dp[n-1]+dp[n-2]


N,M=map(int,pin().split())
mod=1000000007
dp=[-1]*(N+1)
dp[0]=1
for i in range(M):
  dp[int(pin())]=0
print(f(N)%mod)