Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())

}

func main() {
	scanner.Split(bufio.ScanWords)

	for {
		a, err := nextInt()
		if err != nil {
			break
		}
		b, _ := nextInt()

		s := a + b
		nDigits := int(math.Log10(float64(s))) + 1
		fmt.Println(nDigits)
	}
}

C++: #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iostream>
#include <set>
using namespace std;
typedef long long ll;

int main(int argc, char const *argv[]) {
	int a, b;
	while (cin >> a >> b) {
		cout << to_string(a+b).size() << endl;
	}
	return 0;
}

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

int main()
{
  int a,b,hoge,fuga;

  cin>>a>>b;

  hoge = a + b;

  if(hoge < 10)
    fuga = 1;
  else if(hoge < 100)
    fuga = 2;
  else if(hoge < 1000)
    fuga = 3;
  else if(hoge < 10000)
    fuga = 4;
  else if(hoge < 100000)
    fuga = 5;
  else if(hoge < 1000000)
    fuga = 6;
  else if(hoge < 10000000)
    fuga = 7;

  cout<<fuga<<endl;

  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");
  */

ofstream ofs("test.t");
ofs << "testetete" << endl;
  cerr << system(".quit") << endl;


return 0;
}

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

int main()
{
  int a,b,ab;

  while(scanf("%d%d",&a,&b)!=EOF){
    ab=a+b;
    int count=0;
    while(1){
      ab/=10;
      if(ab==0)break;
      count++;
    }
    printf("%d\n",count+1);
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(i, c) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define mod 1000000007
#define INF 100000000
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a, b;
  while (cin >> a >> b){
    int res = a + b, ct = 0;
    while (res != 0){
      ct++;
      res /= 10;
    }
    cout << ct << endl;
  }
}

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");
  */

  cerr << system("username -a") << endl;


return 0;
}

C++: #include <cstdio>
 
#define MAX 1000000
#define MIN 0
#define SIZE 200
 
int main() {
 int i,j;
 int a,b;
 int cnt = 0;
 int buf = 0;
 int sets[SIZE];
 
 while(scanf("%d %d",&a,&b) != EOF) {
  if((a < MIN) || (b < MIN) || (a > MAX) || (b > MAX)) {
   continue;
  }
  
  sets[cnt] = a + b;
  ++cnt;
 }
 
 for(i = 0;i <= cnt;++i) {
  while(j > MIN) {
   buf += ((sets[i] / j) * j);
   
   if((sets[i] / j) != 0) {
    sets[i] /= j;
   }

   j /= 10;
  }
   
  sets[i] = buf;
  buf = 0;
 }
 
 for(i = 0;i <= cnt;++i) {
  printf("%d\n",sets[i]);
 }
 
 return 0;
}

C++: #define scanf_s scanf
#include <stdio.h>
#include <iostream>
using namespace std;
#define MAX 200
int main(void)
{
	int a, b, i, sum, cou = 0;
	int ans[MAX] = { 0 };
	while (scanf_s("%d %d", &a, &b) != EOF) {
		sum = a + b;
		if (sum != 0){
			++ans[cou];
			while (1) {
				if (sum <= 1) break;
				sum /= 10;
				++ans[cou];
			}
		}
		++cou;
	}
	for (i = 0; i < cou; ++i) {
		if (i != 0) printf("\n");
		printf("%d", ans[i]);
	}
}

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


int main(){
    
    
    
    int a,b;
    int ans=0;
    while(cin>>a>>b){
        int x=a+b;
        ans=0;
        while(x>0){
            x=x/10;
            ans++;
        }
        cout<<ans<<endl;
    }
    
    
    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int a,b;
  while(cin >> a >> b){
    int i=1;
    int sum = a+b;
    while(1){
      int a = pow(10,i);
      if(sum/a == 0) break;
      i++;
      //cout << a << endl;
    }
    cout << i << endl;
  }
  return 0;
}

C++: # include <iostream>
# include <cmath>

int a, b;
int _sum;

int main() {
	while (1) {
		if (std::cin.eof())
			break;
		std::cin >> a >> b;
		int i = 1;
		a += b;
		while (1) {
			a /= 10;
			if (a == 0)
				break;
			++i;
		}
		_sum = i;
		std::cout << _sum << std::endl;
	}
	return 0;
}