d = int(input()) c = '' i = 1 while True: if len(c)>=100: break c += str(i) i += 1 print(c[d-1])