K=int(input()) N=-1 A=-1 for n in range(1,31): for a in range(n+1): if 2**(a-1)*(n-a)*(n-a-1)==K: N,A=n,a S="" for i in range(N): if i