Paolo has a hag of flour. The flour in the bag has a weight of 3 kilograms. Paolo makes 8 pies using the flour in the bag.
3 of the pies each need 150 grams of the flour.
5 of the pies each need 180 grams of the flour.
Work out the weight of flour that remains in the bag when Paolo has made these pies. Give your answer in grams.