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