After the teacher Maria Ivanovna moved Vovochka from the first row to the second, Vanechka from the second row to the third, and Masha from the third row to the first, the average age of students in the first row increased by one week, in the second row increased by two weeks, and in the third row decreased by four weeks. It is known that there are 12 students each in the first and second rows. How many students are sitting in the third row?