#include using i64 = long long; int main() { char c[] = "123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354"; int d; std::cin >> d; std::cout << c[d - 1] << std::endl; return 0; }