#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
using namespace std;
template <class T> inline void checkmin(T &x,T t){if (t<x) x=t;}
template <class T> inline void checkmax(T &x,T t){if (t>x) x=t;}
class RedIsGood {
public:
double getProfit(int, int);
};
const int N=5005;
double F[2][N];
double RedIsGood::getProfit(int R, int B) {
memset(F,0,sizeof(F));
for (int i=0;i<=R;i++){
int p=i&1;
for (int j=0;j<=B;j++)
if (i+j){
if (j==0) F[p][j]=F[p^1][j]+1;
else if (i) checkmax( F[p][j] , (F[p^1][j]+1)*(1.0*i/(i+j)) + (F[p][j-1]-1)*(1.0*j/(i+j)) );
}
memset(F[p^1],0,sizeof(F[p^1]));
}
return F[R&1][B];
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGxpc3Q+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDxzZXQ+CiNpbmNsdWRlIDxkZXF1ZT4KI2luY2x1ZGUgPHN0YWNrPgojaW5jbHVkZSA8Yml0c2V0PgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KI2luY2x1ZGUgPG51bWVyaWM+CiNpbmNsdWRlIDx1dGlsaXR5PgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KI2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGNtYXRoPgojaW5jbHVkZSA8Y3N0ZGxpYj4KI2luY2x1ZGUgPGN0aW1lPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCnRlbXBsYXRlIDxjbGFzcyBUPiBpbmxpbmUgdm9pZCBjaGVja21pbihUICZ4L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