s = '' d = 1 while len(s) <= 100: s += str(d) d += 1 d = int(input()) print(s[d - 1])