#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;}}