while 1:
a,b=input().split(' ')
if a=='0'and b=='0':
break
#print(b)
a=list(a)
b=list(b)
b.reverse()
a.reverse()
w=0
if len(a)>len(b):
w=len(a)
for i in range(w-len(b)):
b.append(0)
else:
w=len(b)
for i in range(w-len(a)+1):
a.append(0)
dd=list([0]*(w+1))
a=list(map(int,a))
b=list(map(int,b))
dd=list(map(int,dd))
#print(a,b,dd)
ans=0
for i in range(w):
if a[i]+b[i]+dd[i]>=10:
dd[i+1]=1
ans+=1
#print(ans)
if ans==0:
print('No carry operation.')
elif ans==1:
print('1 carry operation.')
else:
print(f'{ans} carry operations.')