A boat travels 300 meters north from dock in an ocean. Because of the current, the boat is also carried 50 meters west as shown. What is the distance from the boat to the dock, rounded to the nearest meter?