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