#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define reps(i, s, n) for(int i = (s); i < (n); i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rreps(i, s, n) for(int i = (n) - 1; i >= (s); i--)
#define INF ~(1 << 31)
#define INFL ~(1LL << 63)

int main()
{
    int N;
    cin >> N;
    vector<int> p(N);
    vector<bool> used(N+1);
    int ans = 0;
    rep(i, N){
        cin >> p[i];
        used[p[i]] = true;
        if(ans == p[i]){
            reps(i, ans+1, N+1){
                if(!used[i]){
                    ans = i;
                    break;
                }
            }
        }
        cout << ans << endl;
    }
}
#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int N;
    cin >> N;
    vector<int64_t> x(N);
    for (int i = 0; i < N; i++) {
        cin >> x[i];
    }
    int64_t man = 0;
    for (int i = 0; i < N; i++) {
        man += abs(x[i]);
    }
    cout << man << "\n";
    double euclid = 0;
    for (int i = 0; i < N; i++) {
        euclid += pow(x[i],2);
    }
    cout << setprecision(12) << fixed;
    cout << sqrt(euclid) << "\n";
    int64_t cheby = 0;
    for (int i = 0; i < N; i++) {
        cheby = max(cheby, abs(x[i]));
    }
    cout << cheby << "\n";
}
