#include<iostream> using namespace std; int main(){ int n,sum=0,max=0,min=0; int score[20001]={0}; cin>>n; for(int i=1;i<=n;i++){ cin>>score[i]; suum+=i; if(score[i]>max) max=score[i]; if(score[i]<min) min=score[i]; } sum-=max+min; printf("%.1lf",sum*1.0/(n-2)); return 0; }