N = int(input()) s = '' if N == 1: s = 1 else: for i in range(N, 0, -1): s += str(i-1) * N print(s)