#include <bits/stdc++.h>
int n, m;
double ans;
int main() {
  while (scanf("%d %d", &n, &m) == 2) {
    if (n == 1) {
      puts("1.000000000000000000");
      continue;
    }
    ans = 0.0;
    for (int i = 1; i <= std::min(m, n); ++i) {
      std::vector<int> p, q;
      for (int j = 0; j < i; ++j) {
        p.push_back(m - j);
        q.push_back(j + 1);
      }
      for (int j = 0; j < n - i; ++j) {
        p.push_back((n - 1) * m - j);
        q.push_back(j + 1);
      }
      for (int j = 0; j < n; ++j) {
        p.push_back(j + 1);
        q.push_back(n * m - j);
      }
      double tmp = 1.0;
      for (int i = 0; i < (int)p.size(); ++i) {
        tmp *= p[i];
        tmp /= q[i];
      }
      ans += tmp * i * i / n;
    }
    printf("%.18lf\n", ans);
  }
  return 0;
}
