#include <bits/stdc++.h>
using namespace std;
int countBits(long long mask) {
  int res = 0;
  while (mask) mask &= (mask - 1), ++res;
  return res;
}
string toString(long long n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
long long toNumber(string s) {
  stringstream ss;
  long long n;
  ss << s;
  ss >> n;
  return n;
}
int main() {
  long double n, m;
  cout.precision(8);
  while (cin >> n >> m) {
    if (n == 1 && m == 1)
      cout << 1 << endl;
    else
      cout << fixed << 1. / n + ((n - 1) / n) * ((m - 1) / (n * m - 1)) << endl;
  }
}
