x, y = 7, 5 X = int(input()) required_length = X while True: current_length = len(str(y)) if current_length == required_length: a = (x - 1) // 2 b = a + 1 c = y print(a, b, c) break next_x = 3 * x + 4 * y next_y = 2 * x + 3 * y x, y = next_x, next_y