#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  cin >> n >> m;
  if (n * m == 1) {
    cout << 1 << endl;
    return 0;
  }
  printf("%.10lf\n", 1.0 / double(n) + (double(n - 1) / double(n)) *
                                           (double(m - 1) / double(n * m - 1)));
  return 0;
}
