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