#include <bits/stdc++.h>
using namespace std;
const int Maxx = 1e5 + 5;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  if (n == 1 && m == 1)
    printf("1.000000000000000\n");
  else {
    double sum = 1.0 / n + (n - 1) * 1.0 / n * (m - 1) / (n * m - 1);
    printf("%.20lf\n", sum);
  }
  return 0;
}
