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