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