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