C = '0' for i in range(1,100): C += str(i) D = int(input()) print(C[D])