Solves PE problem 1.