#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); double xa, ya, xb, yb; cin >> xa >> ya >> xb >> yb; xb *= -1; double ans = -((ya - yb) / (xa - xb)) * xa + ya; cout << fixed << setprecision(15) << ans << '\n'; }