import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int d = sc.nextInt(); final int MAX = 100; StringBuilder sb = new StringBuilder(); int num = 1; while(true) { sb.append(num); if(sb.length() > MAX) break; num++; } String s = sb.toString(); System.out.println(s.charAt(d-1)); } }