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