#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (n == m && m == 1) {
    printf("1");
    return 0;
  }
  double res;
  res = (double)(n - 1) / n;
  res *= m - 1;
  res /= m * n - 1;
  res += (double)1 / n;
  cout << fixed << res;
  return 0;
}
