import sys
N,M=map(int, raw_input().split())

NG=[ 0 for i in range(N+1) ]
for i in range(M):
	a=int( sys.stdin.readline().strip() )
	NG[a]=1

dp=[ 0 for i in range(N+1) ]
dp[0]=1

mod=10**9+7

for i in range(N):
	if i+1<=N and NG[i+1]==0:
		dp[i+1]+=dp[i]
		dp[i+1]%=mod
	if  i+2<=N and NG[i+2]==0:
		dp[i+2]+=dp[i]
		dp[i+2]%=mod

print dp[N]%mod
