n,m=map(int,input().split())
out=[]
for i in range(m):
  out.append(int(input())
from functools import lru_cache

@lru_cache(maxsize=10**5)
def fib_memoized(n):
    if n < 2:
        return n
    elif n in out:
        return 0
    else:
        return fib(n - 1) + fib(n - 2)
print(fib_memorized(n))