#include <iostream>

using namespace std;

int main() {
    string x, y;
    while (cin >> x >> y) {
        if (x == "0" && y == "0") break;
        else {
            int res = 0, t = 0;
            for (int i = x.size() - 1, j = y.size() - 1; i >= 0 || j >= 0; i--, j--) {
                if (i >= 0) t += x[i] - '0';
                if (j >= 0) t += y[j] - '0';
                t /= 10; //向高位进位
                if (t > 0) {
                    res++;//记录进位次数
                }
            }
            if (res == 0) cout << "NO carry operation." << endl;
            else if (res == 1) cout << "1 carry operation." << endl;
            else cout << res << " carry operations." << endl;
        }
    }
    return 0;
}