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>
using namespace std;
int main(){
	long int a = 0, b = 0, c = 0;
	while (cin >> a, b){
		c = a + b;
		if (c / 10000000 < 1){
			if (c / 1000000 < 1){
				if (c / 100000 < 1){
					if (c / 10000 < 1){
						if (c / 1000<1){
							if (c / 100 < 1){
								if (c / 10 < 1){
									cout << 1;
								}
								else{ cout << 2 << endl; }
							}
							else{ cout << 3 << endl; }
						}
						else{ cout << 4 << endl; }
					}
					else{ cout << 5 << endl; }
				}
				else{ cout << 6 << endl; }
			}
			else{ cout << 7 << endl; }
		}
		else{ cout << 8 << endl; }
	}
	return 0;
}

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

    int a, b, count = 1;
    cin >> a >> b;
    int sum = a + b;
    while(sum < 10){
        sum /= 10;
        count++;
    }
    cout << count << endl;
}

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

C++: #include<iostream>
using namespace std;
 
int main(){
   int a[200],b[200],c[200],digit[200];
   int i,imax,j;
   digit = 1;
   i = 0;
   j = 1;
   for(i=0;i<200;i++)digit[i] = 1;
   while(j){
     cin >> a[i] >> b[i];
     c[i] = a[i] + b[i];
     i++;
     if(a[i]==NULL||b[i]==NULL)
       break;
   }
 
   imax = i;
 
   for(i=0;i<imax+1;i++){
     while(c[i]=>10){
       c[i] =/ 10;
       digit[i]++;
     }
   }
 
   for(i=0;i<imax+1;i++)cout << digit[i] << endl;
 
   return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
    int a,b;
    while(cin>>a>>b)
        cout<<(int)log10(a+b)+1<<endl;
    return 0;
}

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

int main() {
	int a, b;
	cin >> a >> b;
	if (a + b < 10) cout << "1" << endl;
	else if (a + b < 100) cout << "2" << endl;
	else if (a + b < 1000) cout << "3" << endl;
	else if (a + b < 10000) cout << "4" << endl;
	else if (a + b < 100000) cout << "5" << endl;
	else if (a + b < 1000000) cout << "6" << endl;
	else if (a + b < 10000000) cout << "7" << endl;
	else if (a + b < 100000000) cout << "8" << endl;
	else if (a + b < 10000000000) cout << "9" << endl;
return 0;
}

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

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

using namespace std;

int main(int argc, char *argv[])
{
    int a,b;
    while(scanf("%d%d",&a,&b) != EOF)
    {
          int x = a+b;
          int count = 0;
          while(x != 0)
          {
                  x = x /10;
                  count ++;
          }
          printf("%d\n",count);
    }

    
    system("PAUSE");
    return EXIT_SUCCESS;
}

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

C++: #include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back

# define inOut(a,b) freopen(a,"r",stdin);freopen(b,"w",stdout);
# define RESET(a) memset(a,0,sizeof(a))
# define MEMO(a) memset(a,-1,sizeof(a))
# define DEBUG puts("Debug-Has-Come-Until-Here")


typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main(){
	cin.tie(NULL);

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

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef long long LL;
typedef  vector<int> VI;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	int a, b;
	while (cin >> a >> b)
	{
		COUT(to_string(a + b).length());
	}
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

C++: #include <iostream>
int main(){
	int a,b,c;
	std::cin>>a>>b>>c;
	if(a*a==b*b+c*c){
		std::cout<<"YES"<<std::endl;
		}
	else if(b*b==a*a+c*c){
		std::cout<<"YES"<<std::endl;
		}
	else if(c*c==a*a+b*b){
		std::cout<<"YES"<<std::endl;
		}
	else std::cout<<"NO"<<std::endl;

	
		
	 return 0;
	}

C++: #include<iostream>
using namespace std;
 
int main(){
   int a[200],b[200],c[200],digit[200];
   int i,imax;
   i = 0;
   for(i=0;i<200;i++)digit[i] = 1;
   while(){
     cin >> a[i] >> b[i];
     c[i] = a[i] + b[i];
     i++;
     if(a[i]==NULL||b[i]==NULL)
       break;
   }
 
   imax = i;
 
   for(i=0;i<imax+1;i++){
     while(c[i]>=10){
       c[i] /= 10;
       digit[i]++;
     }
   }
 
   for(i=0;i<imax+1;i++)cout << digit[i] << endl;
 
   return 0;
}

C++: #include <stdio.h>
int main(){
	int a[200], b[200];
	int i, j, r;
	while(a[i]>=0 && a[i]<=1000000 && b[j]>=0 && b[j]<=1000000){
		for(i=0; i<199; ++i){
			for(j=0; j<199 ; ++j)
				scanf("%d%d", &a[i], &b[j]);
		}
	}
	for(i=0; i<199; ++i){
		for(j=0; j<199 ; ++j){
			r = (a[i]+b[j])/10;
			if(r==0) printf("1");
			else if(r>0 && r<10) printf("2");
			else if(r>=10 && r<100) printf("3");
			else if(r>=100 && r<1000) printf("4");
			else if(r>=1000 && r<10000) printf("5");
			else if(r>=10000 && r<100000) printf("6");
			else if(r>=100000 && r<1000000) printf("7");
			}	
	}	
	return 0;
}

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

int main(){
    int a,b;
    std::cin>>a>>b;
    std::cout<<(int)(log10(a+b))+1<<std::endl;
    return 0;
}

C++: #include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main ()
{
    long long int n,a,b,i,r;
    while (scanf ("%lld %lld",&a,&b)!=EOF)
    {
        i=a+b;
        r=log10(i)+1;
        printf ("%lld\n",r);
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b = 1;
    int ans,line = 0;
    
    while(std::cin >>a>>b;){
        ans = a + b;
        ans /= 10;
        if(ans  <= 9){
            ans = 2;
        }
        else if(ans <= 99){
            ans = 3;
        }
        else if(ans <= 999){
            ans = 4;
        }
        std::cout << ans << std::endl;
    }
    return 0;
}

C++: #include<iostream>
#include<string>
#include<queue>
using namespace std;
int main(){
	string str,str1;
	int num,num1,sum,count=0,a,b;
	while(cin>>num>>num1){
		sum=num+num1;
		a=sum;
		b=sum;
		for(;;){
			a/=10;
			count++;
			if(a==0 ){
				break;
			}
		}
		cout<<count<<endl;
		a=0;count=0;sum=0;
	}
}