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