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