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