Solved problem 33 on PE