There are 6 baskets on the table. Each basket has 17, 12, 9, 4, 13 and 7 apples. Matt chose sixth, Liam chose first, John chose third, Sean chose second, Olivia chose fourth, and Emma chose fifth. How many apples did John and Matt choose in total?