SRM 429. div2-550. Submitted for 170 points