#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void umax(T &a, T b) {
  if (a < b) a = b;
}
const int maxn = 1000000 + 10;
const int INF = 1e9 + 7;
inline void solve(void) {
  int n, m;
  cin >> n >> m;
  double ans;
  if (n == 1 && m == 1) {
    ans = 1;
  } else
    ans = 1 / (n * 1.0) +
          ((n - 1) / (1.0 * (n))) * ((m - 1) / (1.0 * (n * m - 1)));
  printf("%.10lf\n", ans);
}
void init() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main(int argc, const char *argv[]) {
  init();
  solve();
  return 0;
}
