Math-comp Solution