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