poj2215. dynamic programming. Interesting~