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