#include<iostream>
using namespace std;
int main(){
int x,a,y,b,z;
cin >> x >> a >> y >> b;
z = (a*x - b*y) / (a - b);
cout << z;
return 0;
}