Twice a number decreased by the sum of half the same number and 6 is equal to nine. What is the number?