A school bought 12 volleyballs and basketballs in total for $340. Each basketball costs $30, and each volleyball costs $25. How many basketballs did the school buy? Let's think step by step and output the final answer within \boxed{}.
user