水题。
//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<map>
#define xx first
#define yy second
#define LL long long
#define MP make_pair
#define INF 0x3f3f3f3f
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1|1
#define CLR(a, b) memset(a, b, sizeof(a))
using namespace std;
int main()
{
freopen("alex.in", "r", stdin);
freopen("alex.out", "w", stdout);
double n, m;
while(cin >> n >> m)
{
double mxx = 0;
mxx = max(mxx, min(m, n / 3));
mxx = max(mxx, min(n, m / 3));
mxx = max(mxx, min(m / 2, n / 2));
printf("%.3f\n", mxx);
}
return 0;
}
//#pragma com