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