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