c = '' for i in range(101): c = c + str(i) d = int(input()) print(c[d])