K = int(input()) for one in range(2,31): for zero in range(0, 31-one): if one*(one-1)*(2**zero) == 2*K: o = one z = zero print(one,zero) s = "0"*z + "1"*o print(" ".join(list(s)))