POJ#1607 card overhang math problem. RANK 21991