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