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