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