#include <iostream>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;

int main() {
	double h, w, ans = 0;
	cin >> h >> w;
	if (w < h) {
		swap (w, h);
	}
	ans = ( w >= 3 * h ? h : max (h / 2, w / 3) );
	cout << fixed << setprecision(4) << ans;
	return 0;
}