#include <bits/stdc++.h>
using namespace std;
const bool testing = false;
void program() {
  double n, m;
  cin >> n >> m;
  if (n == 1 && m == 1)
    cout << 1;
  else
    cout << std::setprecision(17)
         << ((m - 1.0) / (m * n - 1.0)) * ((n - 1.0) / n) + 1.0 / n;
}
int main() {
  if (!testing) {
    program();
    return 0;
  }
  FILE* fin = NULL;
  fin = fopen("in.txt", "w+");
  fprintf(fin, "1 1\n");
  fclose(fin);
  freopen("in.txt", "r", stdin);
  printf("test case(1) => expected : \n");
  printf("0.6666666666666666\n");
  printf("test case(1) => founded  : \n");
  program();
  fin = fopen("in.txt", "w+");
  fprintf(fin, "4 4\n");
  fclose(fin);
  freopen("in.txt", "r", stdin);
  printf("test case(2) => expected : \n");
  printf("0.4000000000000000\n");
  printf("test case(2) => founded  : \n");
  program();
  fin = fopen("in.txt", "w+");
  fprintf(fin, "1 2\n");
  fclose(fin);
  freopen("in.txt", "r", stdin);
  printf("test case(3) => expected : \n");
  printf("1.0000000000000000\n");
  printf("test case(3) => founded  : \n");
  program();
  return 0;
}
