SRM 529. div2-250. Submitted for 248.33 points