SRM 623. div2-250. Submitted for 235 points.