Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	for sc.Scan(){
	    s := nextIntIs()
	    sc.Scan()
	    t := nextIntIs()
        a := len(strconv.Itoa(s+t))
	    fmt.Fprintln(out, a)
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

func nextIntIs() int{
	a, _ := strconv.Atoi(sc.Text())
	return a
}

C++: #include <iostream>
#include <cmath>
int main()
{
  while (!std::cin.eof()) {
    int a, b;
    std::cin >> a >> b;
    if (std::cin.eof()) break;
    for (int i = 1; i < 7; i++) {
      if (a + b < pow(10, i)) {
        std::cout << i << std::endl;
        break;
      }
    }
  }
  return 0;
}

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

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

int main() {
	int a,b,c = 0,ans = 0;
	for(int i = 0; i < 200; i ++){
		cin >> a >> b;
		c = a + b;
		ans = (int)log10((double)c) + 1;
		cout << ans << endl;
	}
	return 0;
}

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

int main() {
	int a, b;
	while (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 <iostream>  
  
using namespace std;  
   
  
int main()   
{  
    int n1,n2;
     cin>> n1;
     cin>> n2;
      int sum;
       sum= n1 + n2;
       while(sum)
{
        int d;
        int count= 0;
        d= sum % 10;
        count++;
        sum= sum / 10;
}
     cout<<count<<endl;
}

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

using namespace std;

int main()
{
	int a,b,n,c=1000000,p=7;
	for(int i=1;i<=200;i++){
		cin>>a>>b;
		n=a+b;
		while(1){
			if(n>=c){
			break;
			}
			else{
			p--;
			c/=10;
			}
		}
		cout<<p<<endl;
		p=7,c=1000000;
	}
	return 0;
}

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

int main(void){
  int c = 0, i, j, a, b, d;
  char tmp[8]; // 0 - 1000000
  for(j = 0; c != EOF && j <= 200; j++){
    i= 0;
    while((c = getchar()) != EOF && c != '\n'){
      tmp[i++] = c;
      if(c == ' '){
        tmp[i] = '\0';
        a = atoi(tmp);
        i = 0;
      }
    }
    tmp[i] = '\0';
    b = atoi(tmp);

    d = a + b;
    for(i = 0; d != 0; i++){
      d /= 10;
    }
    printf("%d\n", i);
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	while (1){
		cin >> a >> b;
		if (cin.eof()) break;
		if (a == b and a == 0) cout << 1 << endl;
		else cout << int(log10(a + b)) + 1 << endl;
	}
}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<cmath>
using namespace std;
  
int main()
{
    int num1, num2,sum;
    int n = 1;
    
    cin >> num1 >> num2;
  
    sum = num1 + num2;
  
    while (true)
    {
        
        int po = pow(10, n);
        if (!((sum % po) == sum))
            n++;
        else
            break;
    }
  
    cout << n << endl;
}

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

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

  while(cin >> a){
    cin >> b;
    c=a+b;
    keta=1;
    while((c/=10)>0) keta++;
    cout << keta << endl;
  }
  
  return 0;
}

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

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

		while( i > 0 )
		{
			i /= 10 ;
			count ++ ;
		}

		cout << count << endl ;
	}

	return 0 ;
}

C++: #include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

int main(void){
	int a,b,dig = 0;
	int sum;

	while(1){
		std::cin >> a >> b;
		sum = a + b;
		while(1){
			if(sum<1) break;
			sum = sum / 10;
			dig++;
		}
		std::cout << dig << "\n";
		if(std::cin.eof()){
			break;
		}
		dig = 0;
	}
	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define eps 1e-6
#define INF (1<<20)
#define PI acos(-1.0)
#define MAX 100005
#ifdef LOCAL
//#include<windows.h>
#endif // LOCAL
using namespace std;
int f(int a,int b)
{
    int t=a+b;
    int r=0;
    while(t)
    {
        t/=10;
        r++;
    }
    return r;
}
int main(int argc,char argv[])
{
    #ifdef LOCAL
    freopen("in.txt","r",stdin);
    //freopen("out.bat","w",stdout);
    #endif // LOCAL
    int a,b;
    while(scanf("%d%d",&a,&b)!=EOF)
    {
        printf("%d\n",f(a,b));
    }
    return 0;
}

C++: #include<string>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	cin >> a>>b;
 string x=IntToString(a+b);
cout<<x.size()<<endl;
return 0;
}
string IntToString(int number)
{
  string stream ss;
  ss << number;
  return ss.str();
}

C++: //Digit Number
#include<bits/stdc++.h>

int digit(long long x){
  int i=1;
  while(true){
    x/=10;
    if(x==0)break;
    i++;
  }
  return i;
}

int main(){
  long long  a, b;
  while(scanf("%lld %lld", &a, &b)!=EOF){
    printf("%d\n", digit(a+b));
  }
  return 0;
}

C++: #include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstdio>
using namespace std;
int main()
{
	int m,n;
	while(cin>>m>>n)
		cout<<ceil(log10((double)(m+n+1)))<<endl;
	getchar();
	return 0;
}

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

int main(){
	int a,b,c;
	int ans;
	int cnt=-1;
	
	while(cin>>a>>b){
		cnt++;
		//-----test-----
		if(cnt==0){cout<<1<<endl;continue;}
		
		//--------------
		c=a+b;
		ans=1;
		while(10<=c){
			c/=10;
			ans++;
		}
		cout<<ans<<endl;
	}
	
	return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  double x, h;
  while (cin >> x >> h, x) {
    cout << prec(8) << x * x + x * hypot(h, x / 2) * 2 << endl;
  }
}