#abc129c

n,m=map(int,raw_input().split())
a={int(raw_input()) for i in xrange(m)}

dp=[0]*(n+1)
dp[0]=1
dp[1]=0 if 1 in a else 1
if n==1:
 print dp[1]
else:
 for i in xrange(2,n+1):
  if not i in a:
   dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
 print dp[n]
