S = "" for i in range(1, 100): S = S + str(i) print S[int(raw_input())]