#include <bits/stdc++.h>
#define rep(i, l, r) for (int i = (l); i < (r); i++)
#define max(p, q) ((p) > (q) ? (p) : (q))
#define min(p, q) ((p) < (q) ? (p) : (q))
#define ALL(a) (a).begin(), (a).end()
#define INF ((1LL << 62) - (1LL << 31))
#define MOD 1000000007
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;

string func(string n) {
    int length = n.length();
    bool flag = (3 <= length) ? true : false;
    if (flag) {
        string t = n.substr(length - 3, 3);
        int a = stoi("1" + t);
        flag = (a % 200 == 0) ? true : false;
    }
    string ans = "";
    if (flag) {
        int plus = 0;
        rep(i, 0, length - 2) {
            int tmp = n[i] - '0';
            int pre = (plus + tmp) / 2;
            plus = (tmp % 2 == 0) ? 0 : 10;
            if (i == 0 && pre == 0) {
                continue;
            }
            ans += to_string(pre);
        }
        return ans;
    } else {
        ans = n + "200";
        return ans;
    }
}

int main(void) {
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    string n;
    ll k;
    cin >> n >> k;
    rep(i, 0, k) { n = func(n); }
    cout << n << endl;
    return 0;
}
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
ll i,t, n,j, a[200600], ans;
double temp;
bool cond;
char c;
string s;
int main()
{
    //I am Monim, a tiny creature of Allah
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n;
    for(i=0;i<n;i++)
        cin >> a[i];
    ans = 0;
    for(i=0;i<n;i++)
        ans+= abs(a[i]);
    cout << ans << endl;
    ans = 0;
    for(i=0;i<n;i++)
        ans+= abs(a[i]*a[i]);
    temp = (double)sqrt(ans);
    cout <<fixed<<setprecision(12)<< temp << endl;
    ans = -10000000000;
    for(i=0;i<n;i++)
        ans = max(ans,abs(a[i]));
    cout << ans << endl;
    return 0;
}

