#include <bits/stdc++.h>
using namespace std;
int n, m;
void run() {
  scanf("%d%d", &n, &m);
  double p1 = 1.0 / n, p2 = n * m == 1 ? 0 : 1.0 * (m - 1) / (n * m - 1),
         ret = p1 + (1 - p1) * p2;
  printf("%.9lf\n", ret);
}
int main() {
  run();
  return 0;
}
