N = int(input()) a, b, c = 0, 0, 0 for k in range(32): if N & (1 << k): if a == 0: a += 1 << k else: b += 1 << k c += 1 << k print(a, b, c)