#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {  
    ll n;
    cin >> n;
    vector<ll> a(n);
    rep(i,n){
        cin >>a[i];
    }
    ll ans;
    ans = n*(n-1)/2;
    sort(a.begin(),a.end());
    ll cnt=0;
    rep(i,n){
        if(i == 0){
            continue;
        }
        if(a[i-1]==a[i]){
            cnt++;
        ans = ans - cnt;    
        }
        else{
            cnt =0;
        }
    }
    cout << ans << endl;

}
#include <bits/stdc++.h>
using namespace std;

int main() {
    long long L;
    cin >> L;

    long long res = 1;
    for(int i = 1; i <= 11; i++) {
        res *= L-i;
        res /= i;
    }
    cout << res << endl;
}