#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <class T>
inline bool read(T &n) {
  T x = 0, tmp = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-' && c != EOF) c = getchar();
  if (c == EOF) return false;
  if (c == '-') c = getchar(), tmp = -1;
  while (c >= '0' && c <= '9') x *= 10, x += (c - '0'), c = getchar();
  n = x * tmp;
  return true;
}
int main() {
  int n, m;
  read(n), read(m);
  if (n == 1 && m == 1)
    printf("1.0000000\n");
  else
    printf("%.7f\n", (1.0 / (double)n + (double)((m - 1) * (n - 1)) /
                                            (double)(n * m - 1) / (double)n));
  return 0;
}
