#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  cin >> n >> m;
  cout.precision(10);
  long double ans = 1.0 / n + ((n - 1.0) / n) * (m - 1.0) / (m * n - 1.0);
  if (n == 1 && m == 1) ans = 1;
  cout << fixed << ans << endl;
}
