let d=Number(require("fs").readFileSync("/dev/stdin","utf-8")); let str=""; let i=1; while(str.length<=d){ str+=String(i); i++; } console.log(str[d-1]);