N=int(input()) k=1 while k<64: a,s,i,k=[0]*(k-1)+[1],1,0,k+1 while sN])