4.zadaca7

#include<iostream>

using namespace std;

int main()
{
double kb, pb,M,V; //realne promjenjive vece tacnosti s tacnoscu 15 decimala
cin >> kb;
cin >> pb;
M = min(kb / 2.0, pb);

V = 3.0 * M / 2.0;
cout << fixed << setprecision(2)<< V << endl;
return 0;
}