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