import numpy as np
n, m = map(int, input().split())
a = []
ans = 1
start = 1

def fib(x):
    f = (((1 + np.sqrt(5)) / 2)**x - ((1 - np.sqrt(5)) / 2)**x ) / np.sqrt(5)
    return f

for i in range(m):
    a.append(int(input()))
    a.append(n)
print(a)

for j in range(m+1):
    y = a[j] - start + 1
    start = a[j] + 1
    ans = ans * int(fib(y))
    print(y)
    print(fib(y))
    print(ans)

print(ans)

