Solve problem 1