N,M = map(int,input().split())
A = [int(input()) for m in range(M)]
dp = (N+1)*[0]
dp[0] = 1
dp[1] = 1

for n in range(1,N+1):
  if n in A:
    dp[n] = 0
  else:
    dp[n] = (dp[n-2]+dp[n-1])%(10**9+7)

print(dp[N])