#include <bits/stdc++.h>
int main() {
  int n, m;
  double ans = 0.0;
  scanf("%d%d", &n, &m);
  if (n == 1)
    ans = 1.0;
  else
    ans = 1.0 / (double)n +
          (double)(n - 1) / (double)n * (double)(m - 1) / (double)(m * n - 1);
  printf("%.10f", ans);
}
