#include <bits/stdc++.h>
using namespace std;
long long rdtsc() {
  long long tmp;
  asm("rdtsc" : "=A"(tmp));
  return tmp;
}
inline int myrand() { return abs((rand() << 15) ^ rand()); }
inline int rnd(int x) { return myrand() % x; }
bool solve() {
  int n, m;
  if (scanf("%d%d", &n, &m) < 2) return 0;
  double res = 0;
  double cur = 1;
  for (int i = 0; i < n - 1; ++i)
    cur *= (n * m - m - i + 0.0) / (n * m - 1 - i + 0.0);
  for (int k = 0;; ++k) {
    res += cur * ((double)(k + 1) / n);
    if (k + 1 != n && k + 1 != m) {
      cur *= (m - 1 - k);
      cur /= (k + 1);
      cur *= (n - 1 - k);
      cur /= (n * m - m - n + 1 + k + 1);
    } else
      break;
  }
  printf("%.18lf\n", res);
  return 1;
}
int main() {
  srand(rdtsc());
  while (1) {
    if (!solve()) break;
  }
  return 0;
}
