#include <bits/stdc++.h>
using namespace std;
int n, m, x[11], y[11], xx[11], yy[11];
int main() {
  long double n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << 1;
    return 0;
  }
  cout.precision(10);
  cout << fixed << (((m - 1) * (n - 1) / (n * m - 1)) + 1) / n;
  cin >> n;
  return 0;
}
