#include <iostream>
#include <vector>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int k;
string akt_slowo;
cin>>k;
vector <string> slowo;
while(cin>>akt_slowo){
slowo.push_back(akt_slowo);}
cout<<slowo[slowo.size() - k];
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKXsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oMCk7CiAgICBjaW4udGllKDApOwogICAgY291dC50aWUoMCk7CiAKICAgICBpbnQgazsKICAgIHN0cmluZyBha3Rfc2xvd287CiAgICBjaW4+Pms7CiAgICB2ZWN0b3IgPHN0cmluZz4gc2xvd287CiAgICB3aGlsZShjaW4+PmFrdF9zbG93byl7CiAgICBzbG93by5wdXNoX2JhY2soYWt0X3Nsb3dvKTt9CiAgICBjb3V0PDxzbG93b1tzbG93by5zaXplKCkgLSBrXTsKfQ==