MOD=10**9+7
n,m=map(int,input().split())
a=set([int(input()) for _ in range(m)])
dp=[0]*(n+1)
if n==1:
  print(1)
  exit()
if 1 in a and 2 in a:
  print(0)
  exit()
elif 1 in a:
  dp[1]=0
  dp[2]=1
elif 2 in a:
  dp[1]=1
  dp[2]=0
else:
  dp[1]=1
  dp[2]=2
  
for i in range(3,n+1):
  if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD
print(dp[-1]%MOD) MOD=10**9+7 MOD 10**9+7 10**9 10 9 7 n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m int(input()) for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(input()) int input() input a=set([int(input()) for _ in range(m)]) a set([int(input()) for _ in range(m)]) set [int(input()) for _ in range(m)] dp=[0]*(n+1) dp [0]*(n+1) [0] 0 n+1 n 1 if n==1:
  print(1)
  exit() n==1 n 1 print(1) print 1 exit() exit if 1 in a and 2 in a:
  print(0)
  exit()
elif 1 in a:
  dp[1]=0
  dp[2]=1
elif 2 in a:
  dp[1]=1
  dp[2]=0
else:
  dp[1]=1
  dp[2]=2
   1 in a and 2 in a 1 in a 1 a 2 in a 2 a print(0) print 0 exit() exit elif 1 in a:
  dp[1]=0
  dp[2]=1 1 in a 1 a dp[1]=0 dp[1] dp 1 0 dp[2]=1 dp[2] dp 2 1 elif 2 in a:
  dp[1]=1
  dp[2]=0 2 in a 2 a dp[1]=1 dp[1] dp 1 1 dp[2]=0 dp[2] dp 2 0 dp[1]=1 dp[1] dp 1 1 dp[2]=2 dp[2] dp 2 2 for i in range(3,n+1):
  if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD i range(3,n+1) range 3 n+1 n 1 if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD i in a i a dp[i]=0 dp[i] dp i 0 dp[i]=(dp[i-1]+dp[i-2])%MOD dp[i] dp i (dp[i-1]+dp[i-2])%MOD dp[i-1]+dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 MOD print(dp[-1]%MOD) print dp[-1]%MOD dp[-1] dp -1 MOD n,m=map(int,input().split()) map(int,input().split()) n a=set([int(input()) for _ in range(m)]) set([int(input()) for _ in range(m)]) a m=map(int,input().split()) map(int,input().split()) m dp=[0]*(n+1) [0]*(n+1) dp MOD=10**9+7 10**9+7 MOD
MOD=10**9+7
n,m=map(int,input().split())
a=set([int(input()) for _ in range(m)])
dp=[0]*(n+1)
if n==1:
  print(1)
  exit()
if 1 in a and 2 in a:
  print(0)
  exit()
elif 1 in a:
  dp[1]=0
  dp[2]=1
elif 2 in a:
  dp[1]=1
  dp[2]=0
else:
  dp[1]=1
  dp[2]=2
  
for i in range(3,n+1):
  if i in a:
    dp[i]=0
  else:
    dp[i]=(dp[i-1]+dp[i-2])%MOD
print(dp[-1]%MOD)