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