POJ 2796 (easy dp)