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