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