def step(n, A):
    if n == 1:
        return 1
    elif n == 2:
        return 2
    elif n in A:
        return 0
    else:
        return step(n-1, A) + step(n-2, A)

N, M = map(int, input().split())
A = [int(input()) for i in range(M)]
print(step(N, A))