N = int(input()) ans = "" if N == 1: print(1) exit() else: for i in range(N)[::-1]: ans += str(i) print(ans*N)