#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int main() { double x1,x2,y1,y2; cin >> x1 >> y1 >> x2 >> y2; x1 *= -1.0; double ans = y1 - ((y2 - y1) / (x2 - x1) * x1); double ans2 = y2 - ((y2 - y1) / (x2 - x1) * x2); cout << (ans + ans2) / 2.0 << endl; return 0; }