SRM 492. div2-250. Submitted for 221 points