#include<stdio.h>
#include<cstdlib>
#include<iostream>
#include<string>
#include<sstream>

using namespace std;

int main(){
    int N;
    cin >> N;

    int v[N];

    for (int i = 0; i < N; i++){
        cin >> v[i];
        if(i>0){
            for(int j = 1; j < i+1; j++){
                if(v[i-j] > v[i-j+1]){
                    //swap(v[i-j],v[i]);
                    int a,b;
                    a=v[i-j];
                    b=v[i-j+1];
                    v[i-j]=b;
                    v[i-j+1]=a;
                }
                else{
                    break;
                }
            }
        }
    }

    for (int i = 0; i < N; i++){
        cout << v[i] <<"\t";
    }
    

    double ans = v[0]*pow(0.5,N-1);
    for (int i = 0; i < N-1; i++){
        ans += v[i+1]*pow(0.5,N-i-1);
    }
    cout << ans <<endl;
    
    return 0;

}