12. (3 points) Xiao Xi bought a total of 30 exercise books of type A and type B, paying 54 yuan, and got 0.5 yuan back. Type A exercise books cost 1.5 yuan each. Type B exercise books cost 2 yuan each. How many type A exercise books did Xiao Xi buy? $\qquad$ books.