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