SRM 565. div2-500. Submitted for 453 points