def kjou(kkk):
    ka=1
    for km in range(kkk):
        ka=ka*(km+1)    
    return ka

def fcof(ad):
    k=ad//2
    if k==0 :
        return 1
    kcnt=0
    for kk in range(k+1):
        ar=ad-(kk)*2
        dk=kjou(kk+ar)/kjou(kk)/kjou(ar)
        kcnt=kcnt+ dk
        print(ad,k,kk,ar)
    return kcnt       

n,m=map(int,input().split())
n=20
m=2
a1=int(input())
a1=3
icnt=1
for i in range(m):
    a2=int(input())
    a2=11
    ad=a2-a1-1
    if ad<=0:
        print(0)
    fcof1=fcof(ad) 
    icnt=icnt*fcof1
    a1=a2
    print(icnt)