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