The James family bought 7 bags of cookies. Each bag had 13 cookies. They have since eaten 27 of the cookies. How many cookies do they have left?