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