#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  double n, m;
  cin >> n >> m;
  cout.precision(7);
  cout << fixed;
  if (m == 1 && n == 1)
    cout << 1;
  else
    cout << (1. / n) + ((n - 1) * (m - 1)) / (n * (m * n - 1));
  return 0;
}
