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