#include <bits/stdc++.h>
using namespace std;
void jebaj() {
  int n, m;
  cin >> n >> m;
  if (n == 1) {
    cout << "1.0000000000\n";
    return;
  }
  long double res = (long double)1 / (long double)(m * n - 1);
  res = res * (long double)(n - 1);
  res = res * (long double)(m - 1);
  res += (long double)1;
  res = res / ((long double)n);
  cout << fixed;
  cout << setprecision(16) << res << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  int t;
  t = 1;
  for (int i = (0); i <= ((t)-1); ++i) {
    jebaj();
  }
}
