#include<bits/stdc++.h> using namespace std; string n; int k; int main(){ cin>>n>>k; cout<<n[k-1]; return 0; }