n = int(input()) test = '' for num in range(1,100): test += str(num) print(str(test[n-1:n]))