from itertools import accumulate print([j for j in accumulate([str(i) for i in range(101)])][-1][int(input())])