N = int(input()) num = '9876543210' print(num[0:N]*N)