import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d = sc.nextInt(); for (int i = 1; i < 100; i++) { if (i < 10) { if (d == 1) { System.out.println(i); return; } d--; } else { if (d == 1) { System.out.println(i / 10); return; } else if (d == 2) { System.out.println(i % 10); return; } d -= 2; } } } }