#include #define rep(i, x) for(ll i = 0; i < x; i++) #define rep2(i, x) for(ll i = 1; i <= x; i++) #define all(a) (a).begin(),(a).end() using ll = long long; using ld = long double; using namespace std; signed main() { ll n, cnt = 0; cin >> n; rep2(i, 100) { if (i <= 9) { if (cnt + 1 == n) { cout << i << endl; return 0; } cnt++; } else { if (cnt + 1 == n) { cout << i / 10 << endl; return 0; } if (cnt + 2 == n) { cout << i % 10 << endl; return 0; } cnt += 2; } } return 0; }