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