n,m = map(int,input().split())
lis = [int(input()) for i in range(m)]
dp = [0 for i in range(n+2)]
dp[0] = 1
for i in range(n):
  if i+1 not in lis:
    dp[i+1] += dp[i]
    dp[i+1] %= 10 ** 9+7
  if i+2 not in lis:
    dp[i+2] += dp[i]
    dp[i+2] %= 10 ** 9 + 7
print(dp[n])
