#define IO ios::sync_with_stdio(false);cin.tie();cout.tie(0)
#pragma GCC optimize(2)
#include<set>
#include<map>
#include<cmath>
#include<stack>
#include<queue>
#include<random>
#include<bitset>
#include<string>
#include<vector>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<unordered_map>
#include<unordered_set>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
int main()
{
    IO;
    int T=1;
    //cin>>T;
    while(T--)
    {
        double x,y,a,b;
        cin>>x>>y>>a>>b;
        double res=x+(y/(y+b))*(a-x);
        printf("%.8lf\n",res);
    }
   
    return 0;
}
#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
void read(int &x){
	static char c;
	while(!isdigit(c=getchar())); x=c^48;
	while(isdigit(c=getchar()))x=(x*10)+(c^48);
}
void read(ll &x){
	static char c;
	while(!isdigit(c=getchar())); x=c^48;
	while(isdigit(c=getchar()))x=(x*10)+(c^48);
}
void chkmax(int &x,int y){if(y>x)x=y;}
void chkmin(int &x,int y){if(y<x)x=y;}
void chkmax(ll &x,ll y){if(y>x)x=y;}
void chkmin(ll &x,ll y){if(y<x)x=y;}

int A,B;

void Work(){
	read(A),read(B);
	for(int i=B;i;--i){
		int d=(A-1)/i+1;
		if(1ll*i*(d+1)<=B) return printf("%d\n",i),void();
	}
}

int main(){Work();}
