s = ''.join(map(str, range(1,100))) print(s[int(input())-1])