#include<bits/stdc++.h> using namespace std; int main() { int a,b,x,y; double z cin>>x>>a>>y>>b; int z=(b*y-a*x)*1.0/(b-a)*1.0; cout<<z; return 0; }