mod = 998244353 def main(): import sys input = sys.stdin.readline A = [] k = 1 i = 1 limit = 2 while k < 10: if i & 1: A.append(1) else: if i == limit: k += 1 limit = i * 2 + 2 A.append(k) i += 1 N = int(input()) print("".join(map(str, A[:N]))) if __name__ == '__main__': main()