#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  double n, m;
  cin >> n >> m;
  cout.precision(10);
  if (n <= 1.5)
    cout << 1 << endl;
  else
    cout << 1 / n + (n - 1) / n * (m - 1) / (n * m - 1) << endl;
  return 0;
}
