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