Ava kept a diary of her dreams every night for a month. She learned many interesting things by reading about her dreams again after the month was over. During the month she wrote 127 pages. If she wrote a total of 85 pages during the first three weeks, how many pages did she write during the fourth week?