d = int(input()) C = [] for i in range(1, 101): C.append(str(i)) C = ''.join(C) print(C[d-1])