#include <bits/stdc++.h>
using namespace std;
int n, m;
signed main() {
  cin >> n >> m;
  if (n == 1 && m == 1) {
    printf("0.0\n");
    return 0;
  }
  double ans1 = 1.0 / (double)n;
  double ans2 = (n - 1) / (double)n * (m - 1) / (double)(n * m - 1);
  printf("%.10lf\n", ans1 + ans2);
  return 0;
}
