A ship is sailing due north. At a certain point the bearing of a lighthouse 12.5 km away is N 38.8° E. Later on, the captain notices that the bearing of the lighthouse has become S 44.2° E. How far did the ship travel between the two observations of the lighthouse?