Count The Blocks

CodeForces - 1327E