Solution to problem 015