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