Complete solution from PPP book, section 1.