#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
double h, w, tmp = 0, ans = 0;
cin >> h >> w;
if(w < h) {
tmp = h;
h = w;
w= tmp;
}
if(w >= 3*h) {
ans = h;
}
else {
ans = max(h / 2, w / 3);
}
cout << fixed << setprecision(4) << ans;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxpb21hbmlwPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJZG91YmxlIGgsIHcsIHRtcCA9IDAsICBhbnMgPSAwOwoJY2luID4+IGggPj4gdzsKCWlmKHcgPCBoKSB7CgkJdG1wID0gaDsKCQloID0gdzsKCQl3PSB0bXA7Cgl9CglpZih3ID49IDMqaCkgewoJCWFucyA9IGg7Cgl9CgllbHNlIHsKCQlhbnMgPSBtYXgoaCAvIDIsIHcgLyAzKTsKCX0KCWNvdXQgPDwgZml4ZWQgPDwgc2V0cHJlY2lzaW9uKDQpIDw8IGFuczsKfQ==