Finish SRM 144 DIV 1 Problem 2