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