import itertools as it
n = int(input())
v = it.chain.from_iterable(it.repeat(x, n) for x in range(9, 9 - n, -1))
print(''.join(str(x) for x in v))