Wrong logic for SRM631|Div2|500