#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  double res;
  if (n * m == 1) {
    res = 1;
  } else {
    res = 1. / n + (n - 1.) / n * (m - 1.) / (n * m - 1);
  }
  cout.setf(ios::floatfield, ios::fixed);
  cout.precision(8);
  cout << res << endl;
  return 0;
}
