#include<iostream> using namespace std; int main(){ float f; cin >> f; int c = (int)(f *1000/1000)%10; cout << c; return 0; }