N = int(input()) S = [str(i) for i in range(9, 9 - N, -1)] print(''.join(S) * N)