def solve(): d = int(input()) champ = "" for i in range(1, 100 + 1): champ += str(i) print(champ[d-1]) solve()