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