N = int(input()) ls = list('9876543210') print(''.join(ls[:N])*N)