n=eval(input())
l=list(map(int,input().split()))
count=0
for i in range(n):
for j in range(i):
if l[i]>l[j]:
count+=1
print(count,end=" ")
count=0
Free Pascal Compiler version 3.2.0 [2021/11/21] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling /tmp/compiler_9odvxbc8/src
src(1,2) Fatal: Syntax error, "BEGIN" expected but "identifier N" found
Fatal: Compilation aborted
Error: /nix/store/wpb0csmcp8gbhzj2pknl41sshq9m5hpk-fpc-3.2.0/bin/ppcx64 returned an error exitcode