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