Problem A of CodeForces Round #259 completed successfully.