Problem 20

Python 2.7