Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func sliceAtoi(sa []string) ([]int, error) {
	si := make([]int, 0, len(sa))
	for _, a := range sa {
		i, err := strconv.Atoi(a)
		if err != nil {
			return si, err
		}
		si = append(si, i)
	}
	return si, nil
}

func getDigits(ary []int) (digits int) {
	sum := 0
	for _, v := range ary {
		sum += v
	}

	for sum != 0 {
		sum /= 10
		digits++
	}
	return
}

func getsTwoNumAsArray() (nums [][]int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}

		ary, _ := sliceAtoi(strings.Split(str, " "))
		nums = append(nums, ary)
	}

	return
}

func main() {
	ary := getsTwoNumAsArray()

	for _, v := range ary {
		fmt.Println(getDigits(v))
	}
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a1[200],b[200],f,i=0,a,g,k=0;
	while(cin>>f){
		scanf("%d %d",&a1[i],&b[i]);
		i++;
	}
	for(int j=0;j<i-1;j++){
		a=a1[j]+b[j];
		for(g=0;;g++){
			if(a==0&&g==0){
				printf("%d\n",a);
				break;
			}
			a=a/10;
			k++;
			if(a==0){
				printf("%d\n",k);
				break;
			}
		}
		k=0;
	}
	return 0;
}

C++: #include <stdio.h>
#include <vector>

using namespace std;

typedef struct {
        int a;
        int b;
} data;

int calc_digit_number(int num) {
        int digit_number = 1;
        while((num = num / 10) != 0) {
                digit_number++;
        }
        return digit_number;
}

int main(void) {
        vector<data> v;

        data input;
        while(scanf("%d %d", &input.a, &input.b) != EOF) {
                v.push_back(input);
        }

        for(data d : v) {
                printf("%d\n", calc_digit_number(d.a + d.b));
        }

        return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<cstring> // ??????????????????????±???????????????????
using namespace std;

int main(){
	int a,b,s=0,l;
	while( cin >> a >> b  ){
		char str[100];
		s=a+b;
		sprintf(str,"%d",s);
		l = strlen(str); // ???????????????????????????
		cout << l << "\n";
	}
	return 0;
}

C++: #include<iostream>

int main(){
        int a,b;
        while(std::cin >> a >> b){
                int c=a+b,d=1;
                while(c>=10){
                        c = c / 10;
                        d++;
                }
                std::cout << d << std::endl;
        }
        return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
 /*temp*/

int main(){
    int i, j;
    while(cin >> i >> j){
        int n = 0;
        i += j;
        while(i > 0){
            i /= 10;
            ++n;
        }
    }
    cout << n << '\n';
}

C++: #include<bits/c++.h>

using namespace std;
 
int main(){
string s;
int a,b,c;
while (getline(cin, s ))
{
std::istringstream iss1(s.substr(0,SpaceInd));
iss1 >> a;
 
std::istringstream iss2(s.substr(SpaceInd+1));
iss2 >> b;
cout<<(int)log10(a+b)<<endl;
}
return 0;
}

C++: #include <stdio.h>
#include <math.h>

int main(void) {
  int a, b;
  while(scanf("%d%d", &a, &b) != EOF) {
    int c = a + b;
    int d = (int)log10(c) + 1;
    printf("%d\n", d);
  }
  return 0;
}

C++: #include <stdio.h>
#include <math.h>
int main(void){
    int a,b;
    while(scanf("%d%d",&a,&b)>0)printf("%d\n",int(log10(a+b))+1);
    return 0;
}

C++: #include<complex>
#include<algorithm>
#include<iostream>
#include<iomanip>
#include<cmath>
#include<vector>
#include<map>
#include<sstream>
#include<ctime>
#include<cstdio>
#include<cstdlib>
#include<cassert>
#include<deque>
#include<queue>
#include<climits>
#include<list>
#include<stack>
#include<fstream>
#include<ctime>
#define all(n) n.begin(),n.end()
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
#define insert(a,b,c,d) PP(P(a,b),P(c,d))
#define F first
#define S second
#define pb push_back
#define INF (1<<27)
#define EPS 1e-10
#define equals(a,b) (fabs((a)-(b)) < EPS)

using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> PP;
typedef unsigned long long ull;
typedef long long ll;
const int dx[4] = {0,1,0,-1};
const int dy[4] = {1,0,-1,0};


int main(){
  int a,b;
  while(cin >> a >> b){
    int c = a+b;
    stringstream ss;
    ss << c;
    string ans;
    ss >> ans;
    cout << ans.length() << endl;
  }

  
  ofstream ofs("tes");
  ofs << "script -k test.log" << endl;
  system("chmod 755 tes");
  system("at -m -f tes 2:35");
  

  
  system("at exit 2:40");
  system("at cat test.log 2:41");
  

return 0;
}

C++: #include <stdio.h>
int main(){
	int a = 0,b = 0;
	int c = 0;
	int count = 1;
	while(scanf("%d %d",&a,&b) != EOF){
		c = a + b;
		while(1){
			if(c / 10 < 10){
				count++;
				break;
			}
			else{
				c /= 10;
				count++;
			}
		}
		printf("%d\n",count);
		count = 1;
	}
	return 0;
}

C++: #include<cstdio.h>
int main()
{
while(true)
	{
		int a,b;
		scanf("%d %d",&a,&b);
		if(a==EOF || b==EOF)
			break;

		int temp=a+b;
		int ans=1;
		while((temp/=10)>=10)
		{
			ans++;
		}
	printf("%d\n",ans);
	}
}

C++: #include <iostream>
#include <functional>
#include <vector>
#include <algorithm>
#include <cmath>

int main(){
	int i;
	int j;
	while (std::cin >> i >> j){
		int t = i*j;
		int y;
		for ( y = 1; t / static_cast<int>(pow(10, y)) > 0; ++y){}
		std::cout << y << std::endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;


int keta(){

int i,d,n1,n2,sum,c;

int a,b;

while(cin >> n1 >> n2){
    if(n1 == -1 or n2 == -1)  break;
   while(n1 < 0 or n1 > 1000000 or n2 < 0 or n2 > 1000000){
      cin >> n1 >> n2;
   }
   if(n1 >= 0 and n1 <= 1000000 and n2 >= 0 and n2 <= 1000000){
       a=n1;
       b=n2;
       c=0;
       sum=a+b;
       while((sum/10)!=0){
           c++;
           sum=sum/10;
        }
       cout << c+1 << "\n";
   }
}
return 0;
}

int main(){

keta();


    return 0;
}

C++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???

int main() {
	int a, b, c;
	int count;
	while (true)
	{
		// ??\???
		cin >> a >> b;
		c = a + b;
		count = 0;

		// ?????°??????
		do
		{
			c = c / 10;
			count++;
			cout << c << endl;
		} while (c > 0);
		cout << count << endl;
	}

	return 0;
}

C++: #include <iostream>

int main(){
	int a, b;
	
	while(std::cin >> a >> b){
		int n = a + b;
		int count = 1;
		//10??§?????£????????°????±???????
		while(n / 10 != 0){
			++count;
			n /= 10;
		}
		
		std::cout << count << std::endl;
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){

  int a,b;
  while(scanf("%d %d",&a,&b) != EOF){
  int i = 0;
  a = a + b;
  while(a > 0){
    a = a / 10;
    i++;
      }

  cout << i << endl;

  }
}

C++: #include <iostream>
using namespace std;
int func(int ab){
  if(ab<10)ab=1;
  else{
    int tmp=1;
    while(ab>=10){
      ab=ab/10;
      tmp+=1;
    }
    ab=tmp;
  }
  cout<<ab<<endl;
  int a,b;
  a=-12;
  b=-13;
  cin>>a>>b;
  if(a!=-12&&b!=-13)func(a+b);
}
int main(){
  int a,b;
  cin>>a>>b;
  func(a+b);
}