#include<stdio.h>
#include<stdlib.h>

int main(void){

	int Px,Py,Qx,Qy;

	scanf("%d %d %d %d",&Px,&Py,&Qx,&Qy);

	printf("%f",(double)(abs(Px)+abs(Qx))/2+(abs(Py)+abs(Qy))/2);

	return 0;

}