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