Solution to problem 45