import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) A = [] words = list(range(9,-1,-1))[:N] for x in words: A += [x] * N print(''.join(map(str,A)))