#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rrep(i,n) for (int i = (int)(n)-1; i>=0; --i) #define For(i,a,b) for(auto i=(a);i<=(b);++i) #define rFor(i,a,b) for(auto i=(b);i>=(a);--i) #define call(var) cerr<<#var<<"="<; using vl = vector; using vb = vector; using Graph = vector; using P = pair; const int MOD=(int)1e9+7; const int INF=(int)1e9; const ll LINF=(ll)1e18; const double pi = acos(-1); template inline bool chmax(t&a,u b){if(a inline bool chmin(t&a,u b){if(b istream& operator>>(istream& is, vector& a){rep(i,a.size()) is >> a[i]; return is;} template ostream& operator<<(ostream& os, vector& a){rep(i,a.size()) os << a[i] << " "; return os;} template istream& operator>>(istream& is, pair& p){is >> p.first >> p.second; return is;} template ostream& operator<<(ostream& os, const pair& p){os << "("<< p.first << "," << p.second << ")"; return os;} template ostream& operator<<(ostream& os, const map& mp){for(auto& t : mp) os << t.first << " " << t.second << "\n"; return os;} int main(){ int n;cin >> n; vi a(n); cin >> a; int ans = 0; rep(i,n){ for(int j=i+1;j