#include <bits/stdc++.h>
int n, m;
bool card[1000010];
double ct = 0.0;
void recur(int last, int level) {
  if (level == n) {
    for (int k = 0; k < m; ++k) {
      int ct2 = 0;
      for (int j = 0; j < n; ++j) {
        if (card[k * n + j]) {
          ++ct2;
        }
      }
      ct += ct2 * ct2;
    }
  } else {
    for (int k = last + 1; k < m * n; ++k) {
      card[k] = true;
      recur(k, level + 1);
      card[k] = false;
    }
  }
}
inline long long binom(int n, int k) {
  long long ans = 1;
  for (int i = 0; i < k; ++i) {
    ans *= n - i;
  }
  for (int i = 0; i < k; ++i) {
    ans /= i + 1;
  }
  return ans;
}
int main() {
  std::cin >> n >> m;
  if (n == 1 && m == 1) {
    std::cout << 1 << std::endl;
    return 0;
  }
  std::cout << (1 + ((double)(n - 1) * (m - 1)) / (n * m - 1)) / n << std::endl;
  return 0;
}
