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