from sys import stdin def main(): input = lambda: stdin.readline()[:-1] N = int(input()) num = '1234567890' print(num[:N] * N) main()