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