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