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