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