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