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