A hiker is walking from one town to another over five days.

On the first day he covers one fifth of the total distance.

The next day he covers one quarter of what is left.

The following day he covers two fifths of the remainder and on the fourth day half of the remaining distance.

He now has 10 miles left.

How many miles has he walked?