N = int(input()) c, remainder = divmod(N, 36) # NOTE: dict ではなく list にしたほうがカッコイイけど、 # 余りの値: a, b という対応にしたほうが分かりやすいと思ったので。 a, b = { 1: (1, 2), 2: (1, 3), 3: (1, 4), 4: (1, 5), 5: (1, 6), 6: (1, 7), 7: (1, 8), 8: (1, 9), 9: (2, 3), 10: (2, 4), 11: (2, 5), 12: (2, 6), 13: (2, 7), 14: (2, 8), 15: (2, 9), 16: (3, 4), 17: (3, 5), 18: (3, 6), 19: (3, 7), 20: (3, 8), 21: (3, 9), 22: (4, 5), 23: (4, 6), 24: (4, 7), 25: (4, 8), 26: (4, 9), 27: (5, 6), 28: (5, 7), 29: (5, 8), 30: (5, 9), 31: (6, 7), 32: (6, 8), 33: (6, 9), 34: (7, 8), 35: (7, 9), 0: (8, 9), }[remainder] def calculate_answer(a: int, b: int, c: int) -> int: x = 10 * a + b for _ in range(c): x = 10 * x + b return x print(calculate_answer(a, b, c))