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