n, m = map(int, input().split())

a_lst = []
case = [0] * n
for j in range(m):
  a = int(input())
  a_lst.append(a)

for k in range(n):
  if (k + 1) in a_lst:
    pass
  elif k == 0:
    case[k] = 1
  elif k == 1:
    case[k] = case[k-1] + 1
  else:
    case[k] = case[k-1] + case[k-2]
print(case[-1])