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