#include <bits/stdc++.h> using namespace std; int main( ) { int h,s,t; cin>>h; s=h%10; t=(h-s)/10%10; cout<<t; return 0; }