D = int(input()) C = "".join(map(str, [i for i in range(100)])) print(C[D])