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