POJ 1163 (easy dp)