#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = acos(-1);
template <class T>
T sqr(T x) {
  return x * x;
}
template <class T>
T abs(T x) {
  return x < 0 ? -x : x;
}
int main() {
  double n, m;
  cin >> n >> m;
  double ans;
  if (n == 1 && m == 1) {
    ans = 1;
  } else {
    ans = 1 / n + (n - 1) / n * (m - 1) / (n * m - 1);
  }
  printf("%0.10lf\n", ans);
  return 0;
}
