#include<stdio.h>
int main()
{
int n,ary[1010],i,count,a,k;
while(scanf("%d",&n)!=EOF)
{
for(a=1;a<=n;a++)
scanf("%d",&ary[a]);
count=0;
for(i=1;i<=n;i++)
{
for(k=i+1;k<=n;k++)
if(ary[i]>ary[k])
count++;
}
printf("Minimum exchange operations : %d\n",count);
}
return 0;
}
int main()
{
int n,ary[1010],i,count,a,k;
while(scanf("%d",&n)!=EOF)
{
for(a=1;a<=n;a++)
scanf("%d",&ary[a]);
count=0;
for(i=1;i<=n;i++)
{
for(k=i+1;k<=n;k++)
if(ary[i]>ary[k])
count++;
}
printf("Minimum exchange operations : %d\n",count);
}
return 0;
}