#include<bits/stdc++.h>
#define fr(i,a,b,step) for(rg int i=a;i<=b;i+=step)
#define rp(i,a,b,step) for(rg int i=a;i>=b;i-=step)
#define inf 0x3f3f3f3f3f3f
#define rs(a,b) memset(a,b,sizeof(a))
#define bug printf("debug");
#define ie inline
#define rg register
using namespace std;
typedef long long ll;
const int _=1e6+10;
int n, k;
ll v;
void init(){}
void file(){freopen(".in","r",stdin);freopen(".out","w",stdout);}

signed main(){
//	file();
	init();
	cin>>n>>k;
	fr(i,1,n,1){
		fr(j,1,k,1){
			v+=i*100+j;
		}
	}
	cout<<v;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
REP(i,v.size()){if(i)os<<" ";os<<v[i];}return os;}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
REP(i,v.size()){if(i)os<<endl;os<<v[i];}return os;}

int main() {
cout << fixed << setprecision(15);
 
    int n;
    cin >> n;
    vector<int>x(n);
    for(int i=0;i<n;i++)cin >> x[i];
 
    long ans1=0;
    for(int i=0;i<n;i++)ans1+=abs(x[i]);
    cout << ans1 << endl;
 
    long ans2=0;
    for(int i=0;i<n;i++)ans2+=abs(x[i])*(long)abs(x[i]);
    cout << sqrt(ans2) << endl;
 
    int ans3=0;
    for(int i=0;i<n;i++)ans3=max(ans3,abs(x[i]));
    cout << ans3 << endl;
}