#include <bits/stdc++.h>
int main() {
  double N, M;
  scanf("%lf %lf", &N, &M);
  double res = 1 / N + (N + M >= 2.5 ? (N - 1) / N * (M - 1) / (N * M - 1) : 0);
  printf("%.10lf\n", res);
  return 0;
}
