#include<iostream>
#include<algorithm>
#define MAXN 15
using namespace std; //int rec[MAXN]; int main()
{
//freopen("acm.acm","r",stdin);
int ans;
int x;
int y;
int dight_x;
int dight_y;
int i;
int rec;
while(cin>>x>>y)
{
if(!x&&!y)
break;
ans = ;
i = ;
rec = ;
while(y||x)
{
dight_x = x%;
dight_y = y%;
x /= ;
y /= ;
if(rec + dight_x + dight_y > )
{
rec = ;
++ ans;
}
else
rec = ;
}
if(ans == )
cout<<"No carry operation."<<endl;
else if(ans > )
cout<<ans<<" carry operations."<<endl;
else
cout<<ans<<" carry operation."<<endl;
}
}