#include using namespace std; typedef unsigned long long ull; typedef long long ll; int main(){ int d; cin >> d; string s=""; for(int i=1; i<100; i++) s+=to_string(i); cout << s[d-1] << endl; return 0; }