#include using namespace std; const int INF = 1e9 + 7; int main() { string s = "01234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545"; int n; cin >> n; cout << s[n] << endl; }