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