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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;

    long long mx = 0, tot = 0, x;
    long double d = 0;
    for (int i = 0; i < n; ++i) {
        cin >> x;
        mx = max(mx, abs(x));
        tot += abs(x);
        d += (x * x);
    }
    cout << tot << '\n' << setprecision(14) << sqrt(d) << '\n' << mx;
}
#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  int N;
  cin >> N;
 
  int64_t ans = pow(2,N+1);
 
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    string S;
    cin >> S;
    if(S == "AND"){
      vec.at(i) = 1;
    }else {
      vec.at(i) = 0;
    }
  }
  
  int64_t dp[N+3][2]; //[][1]=true
  dp[0][0] = 1;
  dp[0][1] = 1;
  
  for (int i = 0; i < N; i++) {
    if(vec.at(i) == 1){ //AND
      dp[i+1][1] = dp[i][1];
      dp[i+1][0] = powl(2,i+2) - dp[i+1][1];
    }else{
      dp[i+1][0] = dp[i][0];
      dp[i+1][1] = powl(2,i+2) - dp[i+1][0];
    }
    
    //cout << "true = " << dp[i+1][1] << " false = " << dp[i+1][0] << endl;
    
  }
 
  cout << dp[N][1]  << endl;
}