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