#include<bits/stdc++.h> using namespace std; int main() { double a,d; int b,c; cin>>a; a*=10; c=a; while(c) { b*=10; b+=c%10; c/=10; } for(d=b;d>=10;) { d/=10; } cout<<d<<endl; return 0; }