import sys
n,m=map(int,input().split())
if m != 0:
  a=set(map(int,sys.stdin.read().split()))
else:
  a=set()

modx=10**9+7

dp=[0]*(n+10)
dp[0]=1

for i in range(n+1):
  if i+1 not in a:
    dp[i+1]= (dp[i]+dp[i+1]) % modx
  if i+2 not in a:
    dp[i+2]= (dp[i]+dp[i+2]) % modx

print(dp[n]) import sys sys n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m if m != 0:
  a=set(map(int,sys.stdin.read().split()))
else:
  a=set() m != 0 m 0 a=set(map(int,sys.stdin.read().split())) a set(map(int,sys.stdin.read().split())) set map(int,sys.stdin.read().split()) map int sys.stdin.read().split() sys.stdin.read().split sys.stdin.read() sys.stdin.read sys.stdin sys stdin read split a=set() a set() set modx=10**9+7 modx 10**9+7 10**9 10 9 7 dp=[0]*(n+10) dp [0]*(n+10) [0] 0 n+10 n 10 dp[0]=1 dp[0] dp 0 1 for i in range(n+1):
  if i+1 not in a:
    dp[i+1]= (dp[i]+dp[i+1]) % modx
  if i+2 not in a:
    dp[i+2]= (dp[i]+dp[i+2]) % modx i range(n+1) range n+1 n 1 if i+1 not in a:
    dp[i+1]= (dp[i]+dp[i+1]) % modx
   i+1 not in a i+1 i 1 a dp[i+1]= (dp[i]+dp[i+1]) % modx dp[i+1] dp i+1 i 1 (dp[i]+dp[i+1]) % modx dp[i]+dp[i+1] dp[i] dp i dp[i+1] dp i+1 i 1 modx if i+2 not in a:
    dp[i+2]= (dp[i]+dp[i+2]) % modx i+2 not in a i+2 i 2 a dp[i+2]= (dp[i]+dp[i+2]) % modx dp[i+2] dp i+2 i 2 (dp[i]+dp[i+2]) % modx dp[i]+dp[i+2] dp[i] dp i dp[i+2] dp i+2 i 2 modx print(dp[n]) print dp[n] dp n a=set(map(int,sys.stdin.read().split())) set(map(int,sys.stdin.read().split())) a dp=[0]*(n+10) [0]*(n+10) dp n,m=map(int,input().split()) map(int,input().split()) n m=map(int,input().split()) map(int,input().split()) m a=set() set() a modx=10**9+7 10**9+7 modx
import sys
n,m=map(int,input().split())
if m != 0:
  a=set(map(int,sys.stdin.read().split()))
else:
  a=set()

modx=10**9+7

dp=[0]*(n+10)
dp[0]=1

for i in range(n+1):
  if i+1 not in a:
    dp[i+1]= (dp[i]+dp[i+1]) % modx
  if i+2 not in a:
    dp[i+2]= (dp[i]+dp[i+2]) % modx

print(dp[n])