poj1004. A + B level problem