A person travels at 35 km/h. He realized that he will be late by 1 hour and if he increased his speed by 15 km/h he will reach 30 min early. Then what is the distance?