#include using namespace std; typedef pair P; typedef pair P2; int main() { string a = ""; for (int i = 1; i < 105; ++i) { a += to_string(i); } int d; cin >> d; cout << a[d - 1] << '\n'; return 0; }