Farmer John is grazing his cows at the origin. There is a river that runs east to west 50 feet north of the origin. The barn is 100 feet to the south and 80 feet to the east of the origin. Farmer John leads his cows to the river to take a swim, then the cows leave the river from the same place they entered and Farmer John leads them to the barn. He does this using the shortest path possible, and the total distance he travels is $d$ feet. Find the value of $d$.