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