Solve problem 541