import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static int max(int a, int b){ if(a>b){ return a; } else{ return b; } } public static int[] sort(int[] a,int n){ int t=1; while(t!=0){ t=0; for(int i=0;ia[i+1]){ t++; int temp=a[i]; a[i]=a[i+1]; a[i+1]=temp; } } } return a; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] a = new int[n]; for(int a_i=0; a_i < n; a_i++){ a[a_i] = in.nextInt(); } int[] b=new int[n]; b=sort(a,n); int ans=0; for(int i=0;i