using System.Collections.Generic; using System; public class Hello { static void Main() { var n = int.Parse(Console.ReadLine().Trim()); getAns(n); } static void getAns(int n) { var a = new List() { 0 }; for (int i = 1; i <= 9; i++) for (int j = i + 1; j < 9; j++) a.Add(i * 10 + j); if (n <= 36) { Console.WriteLine(a[n]); return; } var s = n / 36; var r = n % 36; Console.Write(a[r]); var c = a[r] % 10; for (int i = 0; i < s; i++) Console.Write(c); Console.WriteLine(); } }