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