using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var list = new List(); for (int i = 1; i <= 8; i++) { for (int j = i + 1; j <= 9; j++) { var X = 10 * i + j; list.Add(X); } } var r = N % list.Count; var seed = list[r - 1]; var times = N / list.Count ; Console.Write(seed); for (int i = 0; i < times; i++) { Console.Write(seed % 10); } Console.WriteLine(); } }