N = int(input().strip()) if N == 1: print('1') else: print(''.join([''.join([str(i) for i in range(N)]) for j in range(N)])[::-1])