Welcome to Codeforces Beta Round #25 (Div. 2)
Authors of today's round problems are Mike Mirzayanov and me. I want to thank to Dmitry Levshunov for technical assistance in organizing the contest, as well as Gerald Agapov and Nikolay Kuznetsov for writing alternative solutions.
I wish you all good luck!
UPD: The contest is over, thank you to everyone for participating.