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