#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  double n, m;
  cin >> n >> m;
  if (m * n == 1)
    cout << 1 << endl;
  else
    cout << 1 / n + (n - 1) / n * (m - 1) / (m * n - 1) << endl;
}
