#!/usr/bin/ python3.8 import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines X = int(read()) def gen_Pell_sol(): x = 1 y = 1 while True: yield x, y x, y = 3 * x + 4 * y, 2 * x + 3 * y for x, y in gen_Pell_sol(): if x == 1: continue a = (x - 1) // 2 b = (x + 1) // 2 c = y if len(str(c)) == X: print(a, b, c) break