sovle problem 39