//#include "stdafx.h"//If the vc++6.0, with this line.
#include "stdio.h"
double average(double a[]){
int i;
double max,min;
for(max=min=a[0],i=1;i<5;i++){
if(a[i]>max) max=a[i];
if(a[i]}
return (min+max)/2;
}
int main(void){
double a[5];
int i;
for(i=0;i<5;scanf("%lf",a+i++));
printf("The result is %g\n",average(a));
return 0;
}