N = int(input()) print("".join(map(str, range(9, -1, -1)))[0:N] * N)