Codeforces, Round 202 div 2, A-CinemaLine. AC.