#include <stdio.h>
int main ()
{
int n , a [ 1200] ,i , j ,r ,p ;
while (scanf ("%d",&n) ==1 )
{
for (i=0 ;i<n ; i++)
scanf ("%d",&a[i] ) ;
r= n-1 ;
int cnt =0 ;
for (i = 0 ; i<r ; i++)
{
for (j= 0 ; j< r-i ; j++)
{
if (a[j] > a[j+1])
{
cnt ++ ;
p = a [j] ;
a [j] = a [j+1] ;
a [j+1] = p ;
}
}
}
printf ("Minimum exchange operations : %d\n",cnt ) ;
}
return 0 ;
}
int main ()
{
int n , a [ 1200] ,i , j ,r ,p ;
while (scanf ("%d",&n) ==1 )
{
for (i=0 ;i<n ; i++)
scanf ("%d",&a[i] ) ;
r= n-1 ;
int cnt =0 ;
for (i = 0 ; i<r ; i++)
{
for (j= 0 ; j< r-i ; j++)
{
if (a[j] > a[j+1])
{
cnt ++ ;
p = a [j] ;
a [j] = a [j+1] ;
a [j+1] = p ;
}
}
}
printf ("Minimum exchange operations : %d\n",cnt ) ;
}
return 0 ;
}