n = int(input()) if n == 0: print(-1) else: # Check if n can be represented as f(x) for some x found = False for x in [1, 3, 7, 31, 2, 6, 12, 8, 28, 4, 15, 24, 16, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767]: # Compute f(x) if x == 1: f = 1 elif x == 2: f = 3 elif x == 3: f = 4 elif x == 4: f = 7 elif x == 6: f = 12 elif x == 7: f = 8 elif x == 8: f = 15 elif x == 12: f = 28 elif x == 15: f = 24 elif x == 16: f = 31 elif x == 24: f = 60 elif x == 28: f = 56 elif x == 31: f = 32 else: continue if f == n: print(1) print(x) found = True break if not found: print(3) print('1 6 12')