Your school has a $1200 grant to buy books and magazines subscriptions for the school library. The average cost of a magazine subscription is $30. Your school decides to spend $870 on books and the remaining amount on magazines subscriptions. How many magazine subscriptions can the school buy?