// WIP

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

#define ALL(X) (X).begin(), (X).end()
#define FOR(I, X, Y) for (int I = (X); I < (Y); I++)
using ll = int64_t;
using ull = uint64_t;
namespace std {
template<class ...Ts>        istream& operator>>(istream& i,       tuple<Ts...>& x) { apply([&](auto&&... ys){ ((i >> ys), ...); }, x); return i; }
template<class ...Ts>        ostream& operator<<(ostream& o, const tuple<Ts...>& x) { o << "("; auto s = ""; apply([&](auto&&... y){ ((o << s << y, s = ", "), ...); }, x); return o << ")"; }
template<class T1, class T2> istream& operator>>(istream& i,       pair<T1, T2>& x) { return i >> tie(x.first, x.second); }
template<class T1, class T2> ostream& operator<<(ostream& o, const pair<T1, T2>& x) { return o << tie(x.first, x.second); }
template<class T, class = decltype(begin(declval<T>())), class = enable_if_t<!is_same<T, string>::value>>
istream& operator>>(istream& i,       T& x) { for (auto& y : x) { i >> y; } return i; }
template<class T, class = decltype(begin(declval<T>())), class = enable_if_t<!is_same<T, string>::value>>
ostream& operator<<(ostream& o, const T& x) { o << "{"; auto s = ""; for (auto& y : x) { o << s << y; s = ", "; } return o << "}"; }
}

#ifdef DEBUG
#define dbg(...) do { cout << #__VA_ARGS__ ": " << make_tuple(__VA_ARGS__) << endl; } while (0)
#define dbg2(X) do { cout << #X ":\n"; for (auto& __x : (X)) { cout << __x << endl; } } while (0)
#else
#define dbg(...)
#define dbg2(X)
#endif

using Real = long double;

// Main
void mainCase() {
  int n;
  cin >> n;
  vector<Real> xs(n);
  cin >> xs;

  array<Real, 3> res = {};
  for (auto x : xs) {
    res[0] += abs(x);
    res[1] += x * x;
    res[2] = max(res[2], abs(x));
  }
  res[1] = sqrt(res[1]);

  FOR(i, 0, 3) {
    cout << setprecision(numeric_limits<Real>::digits10 + 1) << res[i] << "\n";
  }
}

int main() {
  ios_base::sync_with_stdio(0); cin.tie(0);
  mainCase();
  return 0;
}

/*
python misc/run.py atcoder/abc180/b/main.cpp

{{TESTS}}
*/

#include <cstdio>




using ll = long long int;
int cnt[405];
int N;

int main(){
    scanf("%d",&N);

    for(int i=0;i<N;i++){
        int tmp;
        scanf("%d",&tmp);
        cnt[tmp+200]++;
    }
    ll ans=0ll;
    for(int i=0;i<=400;i++){
        for(int j=i+1;j<=400;j++){
            ll diff=j-i;
            // if (cnt[i]&&cnt[j])
            //     printf("diff=%lld\n",diff);
            ans+=(diff*diff*cnt[i]*cnt[j]);
        }
    }

    printf("%lld\n",ans);

    return 0;
}