def sol(w,b,ls):
if(w==0):
return 0
elif(b==0):
return 1
if(b==2):
return(w/(w+2) + (2/(2+w))*((1)/(w+1)))
if(b==1):
return(w/(w+b))
if(ls[w][b] != -1):
return(ls[w][b])
prob = w/(w+b)
prob += (b/(b+w))*((b-1)/(b+w-1))*(((b-2)/(w+b-2))*sol(w,b-3,ls)+(w/(w+b-2))*sol(w-1,b-2,ls))
ls[w][b] = prob
return prob
w,b = map(int,input().split())
ls = [[-1]*(b+1) for _ in range(w+1)]
print("%.9f" % sol(w,b,ls))
#include <bits/stdc++.h>
using namespace std;
int w, b;
double dp[1005][1005][2]; // person and turn
int main() {
cin >> w >> b;
// BASE CASES
// either shitter wins
for(int i = 1; i <= w; i++) {
dp[i][0][0] = 1; // princess goes first
dp[i][0][1] = 0;
}
for(int i = 0; i <= b; i++) {
dp[0][i][0] = 0; // princess has no chance
dp[0][i][1] = 0; // dragon garunteed
}
for(int i = 1; i <= w; i++) {
dp[i][1][0] = ((double) i / (double) (i + 1)) + ((double) 1 / (double) (i + 1)) * dp[i - 1][0][1];
dp[i][1][1] = ((double) 1 / (double) (i + 1)) * dp[i - 1][0][0];
for(int j = 2; j <= b; j++) {
double pWin = (double) i / (double) (i + j);
double pSad = (double) j / (double) (i + j);
double pWhite = (double) i / (double) (i + j - 1);
double pBlack = (double) (j - 1) / (double) (i + j - 1);
// cout << "WIN: " << pWin << '\n';
dp[i][j][0] = pWin + pSad * dp[i][j - 1][1];
dp[i][j][1] = pSad * (pWhite * dp[i - 1][j - 1][0] + pBlack * dp[i][j - 2][0]);
// cout << dp[i][j][0] << ' ';
}
// cout << '\n';
}
cout << setprecision(10) << dp[w][b][0] << '\n';
}
102B - Sum of Digits | 707A - Brain's Photos |
1331B - Limericks | 305B - Continued Fractions |
1165B - Polycarp Training | 1646C - Factorials and Powers of Two |
596A - Wilbur and Swimming Pool | 1462B - Last Year's Substring |
1608B - Build the Permutation | 1505A - Is it rated - 2 |
169A - Chores | 765A - Neverending competitions |
1303A - Erasing Zeroes | 1005B - Delete from the Left |
94A - Restoring Password | 1529B - Sifid and Strange Subsequences |
1455C - Ping-pong | 1644C - Increase Subarray Sums |
1433A - Boring Apartments | 1428B - Belted Rooms |
519B - A and B and Compilation Errors | 1152B - Neko Performs Cat Furrier Transform |
1411A - In-game Chat | 119A - Epic Game |
703A - Mishka and Game | 1504C - Balance the Bits |
988A - Diverse Team | 1312B - Bogosort |
1616B - Mirror in the String | 1660C - Get an Even String |