Solve problem 53 using Python.