import numpy as np
N,M=map(int,input().split())
A=set([int(input()) for _ in range(M)])

mod=10**9+7

dp=np.zeros(N+1)
dp[0]=1
if 1 not in A:
    dp[1]=1
else:
    dp[1]=0

for i in range(2,N+1):
    if i in A:
        continue
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod

print(int(dp[N])) import numpy as np numpy 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)] mod=10**9+7 mod 10**9+7 10**9 10 9 7 dp=np.zeros(N+1) dp np.zeros(N+1) np.zeros np zeros N+1 N 1 dp[0]=1 dp[0] dp 0 1 if 1 not in A:
    dp[1]=1
else:
    dp[1]=0 1 not in A 1 A dp[1]=1 dp[1] dp 1 1 dp[1]=0 dp[1] dp 1 0 for i in range(2,N+1):
    if i in A:
        continue
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod i range(2,N+1) range 2 N+1 N 1 if i in A:
        continue
     i in A i A continue dp[i]=dp[i-1]+dp[i-2] dp[i] dp i dp[i-1]+dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 dp[i]%=mod dp[i] dp i mod print(int(dp[N])) print int(dp[N]) int dp[N] dp N dp=np.zeros(N+1) np.zeros(N+1) dp N,M=map(int,input().split()) map(int,input().split()) N mod=10**9+7 10**9+7 mod 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
import numpy as np
N,M=map(int,input().split())
A=set([int(input()) for _ in range(M)])

mod=10**9+7

dp=np.zeros(N+1)
dp[0]=1
if 1 not in A:
    dp[1]=1
else:
    dp[1]=0

for i in range(2,N+1):
    if i in A:
        continue
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod

print(int(dp[N]))