you give sequence a_1 a_2 dot a_n consist integersyou apply follow operation sequence choose integer x element equal x begin end note element direction operationfor example 2 1 3 1 1 3 2 follow sequence operation convenience denote element equal x xelement 1 1 1 2 3 3 2 1elements begin 2 3 3 2 1 1 1 1elements end 2 2 1 3 1 1 3 2element begin 1 3 1 1 3 2 2 2elements end 3 3 2 1 1 1 2 3elements begin 2 1 1 1 2 3 3 3elements end you determine minimum number operation sequence sort nondescending order nondescending order mean 2 n condition a_i1 le a_i satisfiedNote answer q independent query