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