#include using namespace std; int main(){ double xa,xb,ya,yb; cin >> xa >> xb >> ya >> yb; cout << (ya+yb)/2 << endl; return 0; }