#include<bits/stdc++.h>
using namespace std;
int human[5];
int year[5];
int times[5];
int v,tot;
double z;
int main(){
cin>>human[1];
cin>>year[1];
cin>>human[2]>>year[2];
times[1]=human[1]*year[1];
times[2]=human[2]*year[2];
z=abs(times[1]-times[2])/abs(year[1]-year[2]);
cout<<fixed<<setprecision(2);
cout<<z;
return 0;
}