Solution to problem 35