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