Diana and some friends want to go to the movies, if they have to pay $15 to get in the movie theater and then $2 for each bag of popcorn that they buy(p), then how many bags of popcorn did they buy if they spent $45 all together?