#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  long double n, m;
  cin >> n >> m;
  if (n * m == 1) {
    printf("1\n");
    return 0;
  }
  long double ans = 1 / n + ((n - 1) / n) * ((m - 1) / (n * m - 1));
  printf("%.9Lf\n", ans);
  return 0;
}
