Janice has a pack of 36 cookies. She splits the cookies equally among herself and eight of her friends. With the cookies she has left, she eats one and puts the rest in a bag for later. How many cookies does she put in the bag?