#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;
}