#include<bits/stdc++.h>
using namespace std;
int main(){
	int a[110]={0},n,i,j;
	float h=0;
	cin>>n;
	for(i=0;i<n;i++){
		cin>>a[i];
	} 	
	for(i=0;i<n;i++){
		h=h+a[i];
		
	}
    cout<<h<<endl;
	h=h/n;
	printf("%.2f\n",h);
	for(i=n-1;i>=1;i--){
	    for(j=0;j<i;j++){
         	if(a[j]<a[j+1]){
         	 	swap(a[j],a[j+1]);
         	      	
         	}
	} 	
    } for(i=0;i<n;i++){
    	cout<<a[i]<<" ";
    }
}

/**************************************************************
	Problem: 1175
	User: wengsihan
	Language: C++
	Result: Accepted
	Time:6 ms
	Memory:2076 kb
****************************************************************/