题目链接:http://codeforces.com/gym/100801/attachments
#include<bits/stdc++.h>
using namespace std;#define debug puts("YES");
#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)
#define ll long long#define lrt int l,int r,int rt
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
#define root l,r,rt
#define mst(a,b) memset((a),(b),sizeof(a))#define pii pair<ll,ll>
#define mk(x,y) make_pair(x,y)
#define fi first
#define se secondconst int maxn =5e3+5;
const int mod=1e9+7;ll powmod(ll x,ll y){ll t; for(t=1;y;y>>=1,x=x*x%mod) if(y&1) t=t*x%mod; return t;}
ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}double h,w,ans;int main()
{freopen("alex.in","r",stdin);freopen("alex.out","w",stdout);ans=0;scanf("%lf%lf",&h,&w);ans=max(ans,min(w/3.0,h));ans=max(ans,min(h/2.0,w/2.0));ans=max(ans,min(h/3.0,w));printf("%.5f\n",ans);return 0;
}