import java.util.*; class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { StringBuilder sb = new StringBuilder(); for (int i=1; i<=100; i++) { sb.append(i); } int d = sc.nextInt(); System.out.println(sb.toString().charAt(d-1)); } }