Henry packed some apples in a box.The total mass of the box and the apples was 16240g.He packed some strawberries in a similar box.The total mass of the box and the strawberries was 6350g. The mass of the apples was 3 times that of the strawberries. Find the mass of the apples.