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