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