#include<bits/stdc++.h>
using namespace std;
int num(int ,int);
int num(int n,int m)
{
if (m==0) return 0;
int s=0;
while(n+m>=12)
{
if(n/12>=m) return m;
if(m==0) return s;
if(n<12)
{
m-=(12-n);
n=12;
}
else
{
s+=n/12;
m+=n/12;
n=n%12+n/12;
}
}
return s;
}
int main()
{
int n,m,z=0;
while(cin>>n>>m)
{
int nu=num(n,m);
cout<<nu<<endl;
}
}
下方
愚人節快樂!!!!!!!!!!!