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