#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-8;
const int MOD = 1000000007;
const int INF = 2e9 + 12;
const int SIZE = 100012;
void Solve(void) {
  double n, m;
  cin >> n >> m;
  if (n == 1 && m == 1)
    printf("1");
  else
    printf("%.12lf", 1.0 / n + (n - 1.0) / n * (m - 1.0) / (m * n - 1.0));
  return;
}
int main(void) {
  Solve();
  return 0;
}
