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