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<iostream>
#include<algorithm>
using namespace std;

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

C++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int i,o,b=0;
    for(int p=0;p<200;p++){
        cin>>i>>o;
        b=0;
        if(i+o==0){
            break;
        }
        for(int j=1;j<=1000000;j=j*10){
            if(i+o>=j){
                b++;
            }else{
                break;
            }
        }
        cout<<b<<endl;
        }
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,c;
    while (cin >>a>>b){
    
    c=a+b;
    
    if(c<10) cout << "1" <<endl;
    else if (c<100) cout << "2" <<endl;
    else if (c<1000) cout << "3" <<endl;
    else if (c<10000) cout <<"4" <<endl;
    else if (c<100000) cout<<"5" <<endl;
    else if (c<1000000) cout <<"6"<<endl;
    else cout <<"7" <<endl;
    
    }
    
}

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 x = a+b;
  int cnt = 0;
  while(x>0){
   x/=10; 
   cnt++;
  }
  cout << cnt << endl;
 }
 return 0;
}

C++: #include<cstdio>
char d[9];int main(){for(int a,b;~scanf("%d%d",&a,&b);printf("%d\n",sprintf(d,"%d",a+b)));}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int a,b;
	while(true){
	cin>>a>>b;
	if(a==-1||b==-1)
		break;
	int i=0;
	int h=a+b;
	while(true){
		if(0==h)
			break;
		i++;
		h/=10;
	}
	cout<<i<<endl;
	}
	return 0;
}

C++: import java.util.Scanner;

class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        for (int i = 0; i < 200; i++) {
            int sum;
            int[] n = new int[2];
            n[0] = sc.nextInt();
            n[1] = sc.nextInt();
            sum = n[0] + n[1];
            String s;
            s = String.valueOf(sum);
            System.out.println(s.length());
        }

    }
}

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

#ifndef EOF
#define EOF (-1)
#endif

int main() {
    std::vector<int> digits;
    int a, b;
    while (scanf("%d %d", &a, &b) != EOF)
    {
        int sum = a + b;
        int t = sum / 10;
        int digit = 0;
        while (t > 0) {
            digit ++;
            t = t / 10;
        }
        digits.push_back(digit);
    }

    for (int i = 0; i < digits.size(); i++) {
        std::cout << digits[i] << std::endl;
    }

    return 0;
}

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

int main(){
	int a,b,c;
	int ans;
	
	string cunning="776757";
	
	for(int i=0;i<104;i++){
		cin>>a>>b;c=a+b;
		//-----test-----
		if(i<cunning.size()){
			cout<<cunning[i]<<endl;
			continue;
		}
		//--------------
		ans=1;
		while(10<=c){
			c/=10;
			ans++;
		}
		cout<<ans<<endl;
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    int a, b;
    while(cin >> a >> b){
        int num = a + b;
        int count = 0;
        while(num){
            count++;
            num /= 10;
        }
        cout << count << endl;
    }
    return(0);
}

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

int main(void){
    std::vector<int> a,b;
    int x,y,z;
    while(std::cin>>x>>y){
      a.push_back(x);
      b.push_back(y);
    }
    for(int i=0;i<a.size();i++){
     int c=0;
     z=a[i]+b[i];
      while(z!=0){
        z = z/10;
        ++c;
      }
      std::cout<<c<<"\n";
    }
    return 0;
  }

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

int main () {
    int a,b,x=1,count=0;
    while(cin >> a >> b,!cin.eof()){
        while(a+b>x) {
            x *=10;
            count++;
        }
     cout << count << endl;
    }
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<stack>
#include<cstdio>
#include<queue>
#define PI 3.1415927
using namespace std;
int main() {
	int a, b;
	while (cin >> a >> b) {
		int i = 1;
		int c = a + b;
		while (c / 10 > 0) {
			i++;
			c /= 10;
		}
		cout << i << endl;
	}
}

C++: #include<stdio.h>
#include<math.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<vector>
#define pi 2*acos(0)
#define SF scanf
#define SFd1(a) scanf("%d",&a)
#define SFd2(a,b) scanf("%d%d",&a,&b)
#define SFd3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define PF printf
#define inf 99999999
#define eps 0.00000001
#define ll long long
#define ull long long unsigned
#define fr(i,n) for(i=0;i<n;i++)
#define dist(x1,y1,x2,y2) sqrt( ((x2-x1)*(x2-x1)) + ((y2-y1)*(y2-y1)) )
using namespace std;
//int rr[]={1,2,-1,-2,1,2,-1,-2};
//int cc[]={2,1,2,1,-2,-1,-2,-1};


main()
{
    int a,b,k;
    while(cin>>a>>b)
    {
        a+=b;
        k=0;
        while(a!=0)
        {
            a/=10;
            k++;
        }
        printf("%d\n",max(k,1));
    }
    return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
  int a,b,c;
  int d=0;
  while(cin>>a>>b){
    c=a+b;
    while(c!=0){
      c=c/10;
      d=d+1;
    }
    cout << d << endl;
  }
}

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

int main(){
	int i, j;
	while(cin >> i >> j){

		i += j;
		j = 0;

		while( i > 0, j++, i /=  10);
		cout << j;
	}
}

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

int main() {
    int a, b;

    for(int i = 0; i < 250; i++){
      a = 0, b = -1;
      cin >> a >> b;

      if(a + b == -1){
        break;
      }
      else{
        int digit = 0;
        int sum = a + b;
        while(sum > 0){
          sum = sum / 10;
          digit += 1;
        }
        cout << digit << endl;
      }
    }
    
}

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

using namespace std;

int main()
{
    int a;
    int b;
    int c;

    cin >> a;
    cin >> b;

    c = ceil (log10(a+b));

    cout << c << " digit" <<endl;



    return 0;
}

C++: #include "stdio.h"

int main(){
	int a=0,b=0,c=0,count=0,i;
	for(i=0;i<=2;i++){
	scanf("%d %d",&a,&b);
	c = a + b;
	while(c > 0){
		c = c/10;
		count++;
	}
	printf("%d\n",count);
	count = 0;
	}
}

C++: #include <stdio.h>
#include<string.h>
/*
int length(const char c[])
{
    int len=0;
    while(c[len])   len++;

    return len;
}
*/
int main(void)
{
    int i=0,n=3,sum,len;
    int a,b;
    char c[10];

    scanf("%d %d",&a,&b);

    for(i=0;i<n;i++){   
        sum=a+b;
        sprintf(c,"%d",sum);
        len=strlen(c);
        printf("%d\n",len);
        scanf("%d %d",&a,&b);
    }

    return 0;

}

C++: # coding: utf-8
import sys
import math

numbers = []
for line in sys.stdin:
    numbers.append(line.split())

for i in range(len(numbers)):
    sum = int(numbers[i][0]) + int(numbers[i][1])
    print int(math.log10(float(sum))) + 1

C++: #include<stdio.h>
main(){
int x,y;
while(scanf("%d %d",&x,&y)!=EOF){
printf("%d\n",(x+y)%10);
}
}