#33420: _ans


yp11151215@yphs.tp.edu.tw (ck11400703)


#include<bits/stdc++.h>
using namespace std;
main(){
double a,b,c,d,f;
cin.tie(0);
while(cin>>a>>b>>c>>d>>f){
cout<<fixed<<setprecision(6)<<((d-f)*(b-c))/(a-c)+f<<endl;
cout<<endl;
}
}