Caroline packs 12 jars of jam in a box. She has 40 boxes. She has 542 jars of jam. How many jars of jam will she have left when all the boxes are full?