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