#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  float ans;
  ans = float(float(n - 1) / float(n * m - 1) * float(m - 1) + 1) / n;
  if (n * m > 1)
    cout << ans;
  else
    cout << 1;
}
