#include <bits/stdc++.h>
using namespace std;
long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1ll;
  long long _tmp = mypow(_a, _x / 2, _mod);
  _tmp = (_tmp * _tmp) % _mod;
  if (_x & 1) _tmp = (_tmp * _a) % _mod;
  return _tmp;
}
bool equal(double _x, double _y) { return _x > _y - 1e-9 && _x < _y + 1e-9; }
int __ = 1, cs;
void build() {}
int n, m;
void init() {
  n = getint();
  m = getint();
}
void solve() {
  if (n == 1 && m == 1)
    puts("1.000000000000");
  else {
    double ans = 1.0 / (double)n + (double)(n - 1) * (double)(m - 1) /
                                       ((double)n * (double)(n * m - 1));
    printf("%.12f\n", ans);
  }
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}
