#include #include #include #include #include #include #include using namespace std; using uint = unsigned int; using ll = long long; #define CIN( LL , A ) LL A; cin >> A #define GETLINE( A ) string A; getline( cin , A ) #define FOR_ITR( ARRAY , ITR , END ) for( auto ITR = ARRAY .begin() , END = ARRAY .end() ; ITR != END ; ITR ++ ) int main() { CIN( ll , D ); if( D <= 9 ){ cout << D << endl; } else { D -= 10; if( D % 2 == 0 ){ cout << ( D / 20 ) + 1 << endl; } else { cout << ( ( D - 1 ) / 2 ) % 10 << endl; } } return 0; }