Josie selected a number n. She divided n by 2 and then subtracted 0.5 from the result. She took half of that result and then subtracted 0.5 to get the final result of 10. What is the value of n?