tim sold half of his comic books and then bought six more. He now has twelve comic books. How many books did he begin with?

x/2 + 6 = 12