#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>

using namespace std;


void trace(int A[], int N)
{
    int i;
    for (i = 0; i < N; i++) {
        if(i > 0) cout << " ";
        cout << A[i];
    }
    cout << endl;
}

int bubbleSort(int A[], int N){
    bool flag = 1;
    int cnt = 0;
    while (flag){
        flag = 0;
        for (int i=N-1; i >= 1; i--) {
            if (A[i] < A[i-1]) {
                swap(A[i], A[i-1]);
                cnt += 1;
                flag =  1;
            }
        }
    }
    trace(A, N);
    return cnt;
}

int main() {
    int n, num_sec[101]={}, cnt=0;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> num_sec[i];
    cnt=bubbleSort(num_sec, n);
    cout << cnt << endl;
}



  /*  HARD WORK FOREVER PAYS  */
#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define turbo(){	\
	ios_base::sync_with_stdio(false); \
	cin.tie(NULL); \
}
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
typedef unsigned long long int ull; 
  

vector<ull> allPrimes; 
  

void sieve(int n) 
{ 

    vector<bool> prime(n+1, true); 
  

    for (int p=2; p*p<=n; p++) 
    { 

        if (prime[p] == true) 
        { 

            for (int i=p*2; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
  

    for (int p=2; p<=n; p++) 
        if (prime[p]) 
            allPrimes.push_back(p); 
} 

ull factorialDivisors(ull n) 
{ 
    sieve(n);  

    ull result = 1; 

    for (int i=0; i < allPrimes.size(); i++) 
    { 

        ull p = allPrimes[i]; 
        ull exp = 0; 
        while (p <= n) 
        { 
            exp = exp + (n/p); 
            p = p*allPrimes[i]; 
        } 

        result = result*(exp+1)%1000000007; 
    } 

    return result; 
} 

int main() 
{ 
	int n;
	cin>>n;
    cout << factorialDivisors(n)<<endl; 
    return 0; 
} 