N = int(input()) ans_str = "" for i in range(100): ans_str += str(i) ans = ans_str[N] print(ans)