MinAvgTwoSlice solution