https://www.acmicpc.net/problem/27866
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
int n = sc.nextInt();
System.out.println(s.charAt(n-1)); // n-1๋ฒ์งธ ๋ฌธ์๋ฅผ ์ถ๋ ฅ (๋งจ ์ ๋ฌธ์๋ 0๋ฒ์งธ)
}
}