Solve UVa 10801 - Lift Hopping.