#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  if (m == 1) {
    printf("%.6f\n", 1.0 / n);
    return 0;
  }
  double res = 1.0 / n + (double)(n - 1) * (m - 1) / ((double)n * (n * m - 1));
  printf("%.6f\n", res);
  return 0;
}
