#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  double ans = 1.0 / n;
  double t1 = (n - 1) * (m - 1);
  double t2 = n * (m * n - 1);
  if (t2 != 0) ans = ans + t1 / t2;
  cout << fixed << setprecision(12);
  cout << ans << endl;
}
