CodeForce Round 249 Div 2. Became a specialist :)