Last week, carlie had several rice cakes and 3 gronola bars as snacks. The snacks contained a total of 800 calories. If each granola bar had 120 calories and each rice cake had 40 calories, how many rice cakes did she have?