n, m = map(int, input().split())
a = [ int(input()) for _ in range(m) ]
dp = [0]*n
for i in range(n):
  if not i+1 in a:
    if i == 0:
      dp[i] = 1
    elif i == 1:
      dp[i] = 1 + dp[i-1]
    else:
      dp[i] = dp[i-2] + dp[i-1]
print(dp[n-1]%1000000007)