c = "" for i in range(1, 100): c += str(i) d = int(input()) print(c[d-1])