I drove to the beach at a rate of 40 miles per hour. If I had driven at a rate of 50 miles per hour instead, then I would have arrived 45 minutes later. How many miles did I drive?