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]
  if i+2 not in lis:dp[i+2] += dp[i]
print(dp[n])