#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k;
  double n, m;
  cin >> n >> m;
  printf("%.7f\n",
         (n * m - 1 ? (1 / n + (n - 1) * (m - 1) / n / (n * m - 1)) : 1));
  return 0;
}
