Solve div1 medium.