//#include<iostream>
#include<cstdio>
#include<algorithm>
//#include<cmath>
//#include<string.h>
using namespace std;
int main()
{
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
double sum=a+b+c+d;
sum=sum-max(max(a,b),max(c,d))-min(min(a,b),min(c,d));
printf("%.2f",sum/2);
return 0;
}