#include<bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
int num,k,n,m,z;
while(cin>>a>>b)
{
if(a==b&&a.length()==1&&a[0]=='0') break;
num=0;
z=0;
string c,d;
for(int i=0;i<a.length();i++) c+=a[a.length()-1-i];
a=c;
for(int i=0;i<b.length();i++) d+=b[b.length()-1-i];
b=d;
k=(a.length()>b.length()) ?a.length():b.length();
for(int i=0;i<k;i++)
{
n=(a.length()-1>=i) ?a[i]-'0':0;
m=(b.length()-1>=i) ?b[i]-'0':0;
if(n+m+z>=10)
{
//cout<<n<<endl<<m<<endl<<z<<endl;
z=1;
num++;
}
else z=0;
}
if(num>1) printf("%d carry operations.\n",num);
else if(num==1) printf("1 carry operation.\n");
else printf("No carry operation.\n");
}
}