using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace test_2 { class Program { static void Main(string[] args) { int d = int.Parse(Console.ReadLine()); string x = ""; for(int i = 0; i <= d; i++) { x += i.ToString(); } Console.WriteLine(x[d]); } } }