#include <iostream> using namespace std; int main(){ int b; while(cin>>b){ int c = 0; int a[b]; for(int h = 0;h<b;h++){ cin>>a[h]; } for(int i = 0;i<b;i++){ bool flag = false; for(int j =0;j<b-1;j++){ if(a[j]>a[j+1]){ swap(a[j],a[j+1]); c++; } } for(int o = 1;o<b;o++){ if(a[o]<a[o-1]){ flag = true; } } if(flag==false){ break; } } cout<<"Minimum exchange operations : "<< c <<'\n'; } }