n, m = map(int, input().split())
a = [int(input()) for i in range(m)]

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

for i in range(n-1):
  if not (i+1 in a):
    dp[i+1] += dp[i]
  if (i < n-2) and not (i+2 in a):
    dp[i+2] += dp[i]
print(dp[n-1]%1000000007)
                