#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, m;
  cin >> n >> m;
  cout << fixed << setprecision(10)
       << ((n * m == 1) ? 1 : 1 / n + (n - 1) / n * (m - 1) / (n * m - 1))
       << endl;
  return 0;
}
