#include <bits/stdc++.h> using namespace std; int main(){ int n,i=1; cin>>n; string s; while(1){ s+=to_string(i); i++; if(i==1000){ break; } } cout<<s[n-1]<<endl; return 0; }