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