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