#include <iostream>
#include <vector>
int main() {
  std::vector<int> vec(10);
  for (int i = 0; i < 10; i++) {
    std::cin >> vec[i];
  }
  while (1) {
    int a, b = 0;
    for (int j = 0; j < 10; j++) {
      if (vec[j] > vec[j + 1] && j + 1 < 10) {
        a = 0;
        a = vec[j];
        vec[j] = vec[j + 1];
        vec[j + 1] = a;
        b++;
      }
    }
    if (b == 0)
      break;
  }
  for (int i = 9; i >= 7; i++) {
    std::cout << vec[i] << std::endl;
  }
  return 0;
}

#include <iostream>
#include <vector>

int main() {
  std::vector<int> vec(10);
  for (int i = 0; i < 10; i++) {
    std::cin >> vec[i];
  }
  while (1) {
    int a = 0;
    for (int i = 0; i < 9; i++) {
      if (vec[i] > vec[i + 1]) {
        int b = 0;
        b = vec[i];
        vec[i] = vec[i + 1];
        vec[i + 1] = b;
        a++;
      }
    }
    if (a == 0)
      break;
  }
  std::cout << vec[9] << std::endl
            << vec[8] << std::endl
            << vec[7] << std::endl;
  return 0;
}


#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

typedef long long ll;

using namespace std;

int main(void) {
  int h[10];
  for (int i = 0; i < 10; i++) {
    cin >> h[i];
  }

  sort(h, h + 10, greater<int>());

  cout << h[0] << endl << h[1] << endl << h[2];
  while (1)
    ;

  return 0;
}

#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

typedef long long ll;

using namespace std;

int main(void) {
  int h[10];
  for (int i = 0; i < 10; i++) {
    cin >> h[i];
  }

  sort(h, h + 10, greater<int>());

  cout << h[0] << endl << h[1] << endl << h[2] << endl;

  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

int main() {
  vector<int> v;
  int a;

  while (1) {
    for (int i = 0; i < 10; i++) {
      cin >> a;
      v.push_back(a);
    }

    sort(v.begin(), v.end());

    cout << v[0] << endl << v[1] << endl << v[2] << endl;
  }
  return 0;
}

#include <stdio.h>
void SimpleSelectionSort(int *array, int n) {
  int temp = 0;
  int i = 0;
  int j = 0;

  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (array[i] < array[j]) {
        temp = array[i];
        array[i] = array[j];
        array[j] = temp;
      }
    }
  }

  return;
}

int main(void) {
  int array[10];
  int i = 0;
  for (i = 0; i < 10; i++) {
    scanf("%d", &array[i]);
  }

  SimpleSelectionSort(array, 10);

  for (i = 0; i < 3; i++) {
    printf("%d\\n", array[i]);
  }

  return 0;
}


#include <stdio.h>

int main(void) {

  /* 宣言と初期化 */
  int hai[10];
  int i;
  int temp2nd;
  int temp3rd;
  int tempmax;

  for (i = 0; i < 10; i++) {
    printf("山の高さ　");
    scanf("%d", hai[i]);
  }
  /* 代入 */
  temp2nd = hai[0];
  tempmax = hai[0];
  temp3rd = hai[0];

  /* 計算 */
  for (i = 0; i < 10; i++) {
    /* 最大値求める */
    if (hai[i] > tempmax)
      tempmax = hai[i];
  }

  for (i = 0; i < 10; i++) {
    /*2番目求める */
    if (hai[i] < tempmax && hai[i] > temp2nd)
      temp2nd = hai[i];
  }

  for (i = 0; i < 10; i++) {
    /* 3番目求める */
    if (hai[i] > temp3rd && hai[i] < temp2nd)
      temp3rd = hai[i];
  }

  /* 表示 */
  printf("最も高い山の高さ　%d\\n", tempmax);
  printf("２番目に高い山の高さ　%d\\n", temp2nd);
  printf("３番目に高い山の高さ　%d\\n", temp3rd);

  return 0;
}

#include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;

int main(void) {
  /* 宣言と初期化 */
  int hai[10];
  int id[2];
  int i;
  int temp2nd;
  int temp3rd;
  int tempmax;

  for (i = 0; i < 10; i++) {
    cin >> hai[i];
  }
  /* 代入 */
  temp2nd = hai[0];
  tempmax = hai[0];
  temp3rd = hai[0];
  /* 計算 */
  for (int j = 9; j > 1; j--) {
    for (i = 0; i < j; i++) {
      /* 最大値求める */
      if (hai[j] < hai[i]) {
        tempmax = hai[i];
        hai[i] = hai[j];
        hai[j] = tempmax;
      }
    }
  }

  /* 表示 */
  printf("%d\\n", hai[9]);
  printf("%d\\n", hai[8]);
  printf("%d\\n", hai[7]);

  return 0;
}


#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<vi> vvi;
int H[10];
int main() {
  int n;
  vi H(n);
  for (int i = 0; i < 10; i++) {
    cin >> H[i];
  }
  sort(H.rbegin(), H.rend());
  for (int i = 0; i < 3; i++) {
    cout << H[i] << endl;
  }
}

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<vi> vvi;
int H[10];
int main() {
  for (int i = 0; i < 10; i++) {
    cin >> H[i];
  }
  sort(H, H + 10, greater<int>());
  for (int i = 0; i < 3; i++) {
    cout << H[i] << endl;
  }
}


#include <algorithm>
#include <cstdio>

using namespace std;

int main(void) {
  int i, array[10];

  for (i = 0; i < 10; i++)
    scanf("%d", &array[i]);
  sort(array, array + 10);
  for (i = 9; i >= 7; i++)
    printf("%d\\n", array[i]);

  return 0;
}

#include <algorithm>
#include <cstdio>

using namespace std;

int main(void) {
  int i, array[10];

  for (i = 0; i < 10; i++)
    scanf("%d", &array[i]);
  sort(array, array + 10);
  for (i = 9; i >= 7; i--)
    printf("%d\\n", array[i]);

  return 0;
}


#include <iostream>
#include <stdio.h>
using namespace std;

using std::cin;
int main() {
  int a[10];
  int b;
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
  }
  int mou1, mou2, mou3;
  mou1 = a[0];
  for (int i = 0; i < 10; i++) {

    if (mou1 < a[i]) {
      mou1 = a[i];
      b = i;
    }
  }
  a[b] = 0;
  mou2 = a[0];
  for (int i = 0; i < 10; i++) {

    if (mou2 < a[i]) {
      mou2 = a[i];
      b = i;
    }
  }
  a[b] = 0;
  mou3 = a[0];
  for (int i = 0; i < 10; i++) {

    if (mou3 < a[i]) {
      mou3 = a[i];
      b = i;
    }
  }
  cout << mou1 << "\\n" << mou2 << "\\n" << mou3 << "\\n";

  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int a[10];
  int b = 0;
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
  }
  int mou1, mou2, mou3;
  mou1 = a[0];
  for (int i = 0; i < 10; i++) {

    if (mou1 < a[i]) {
      mou1 = a[i];
      b = i;
    }
  }
  a[b] = 0;
  mou2 = a[0];
  for (int i = 0; i < 10; i++) {

    if (mou2 < a[i]) {
      mou2 = a[i];
      b = i;
    }
  }
  a[b] = 0;
  mou3 = a[0];
  for (int i = 0; i < 10; i++) {

    if (mou3 < a[i]) {
      mou3 = a[i];
      b = i;
    }
  }
  cout << mou1 << "\\n" << mou2 << "\\n" << mou3 << "\\n";

  return 0;
}


#include <algorithm>
#include <iostream>
using namespace std;
void q_sort(int array[], int begin, int end);

void q_sort(int array[], int begin, int end) {
  int i = begin;
  int k = end;
  int pivot;
  int temp;
  pivot = array[(begin + end) / 2];
  while (1) {
    while (array[i] < pivot) {
      ++i;
    }
    while (pivot < array[k]) {
      k--;
    }
    if (i >= k) {
      break;
    }
    temp = array[i];
    array[i] = array[k];
    array[k] = temp;
    i++;
    k++;
  }
  if (begin < i - 1) {
    q_sort(array, begin, i - 1);
  }
  if (k + 1 < end) {
    q_sort(array, k + 1, end);
  }
}
int main(int argc, const char *argv[]) {
  int mt[10];
  for (int i = 0; i < 10; i++) {
    cin >> mt[i];
  }
  q_sort(mt, 0, 10);
  for (int i = 9; 6 < i; i--) {
    cout << mt[i] << endl;
  }
  return 0;
}

#include <algorithm>
#include <iostream>
using namespace std;
void q_sort(int array[], int begin, int end);

void q_sort(int array[], int begin, int end) {
  int i = begin;
  int k = end;
  int pivot;
  int temp;
  pivot = array[(begin + end) / 2];
  while (1) {
    while (array[i] < pivot) {
      ++i;
    }
    while (pivot < array[k]) {
      k--;
    }
    if (i >= k) {
      break;
    }
    temp = array[i];
    array[i] = array[k];
    array[k] = temp;
    i++;
    k--; // check
  }
  if (begin < i - 1) {
    q_sort(array, begin, i - 1);
  }
  if (k + 1 < end) {
    q_sort(array, k + 1, end);
  }
}
int main(int argc, const char *argv[]) {
  int mt[10];
  for (int i = 0; i < 10; i++) {
    cin >> mt[i];
  }
  q_sort(mt, 0, 9);
  for (int i = 9; 6 < i; i--) {
    cout << mt[i] << endl;
  }
  return 0;
}

*** stack smashing detected ***: terminated


#include <algorithm>
#include <iostream>
using namespace std;
int main() {
  int a[10];
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
  }
  sort(a, a + 10);
  for (int i = 9; i > 6; i++) {
    cout << a[i] << endl;
  }
  return 0;
}

#include <algorithm>
#include <iostream>
using namespace std;
int main() {
  int a[10];
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
  }
  sort(a, a + 10);
  for (int i = 9; i > 6; i--) {
    cout << a[i] << endl;
  }
  return 0;
}


#include <algorithm>
#include <cstdlib>
#include <functional>
#include <iostream>

#define SIZE 10
#define MAX 10000
#define TOP 3

using namespace std;

int main() {
  int i = 0;
  int height[SIZE];
  char buf[256];

  while (i < SIZE) {
    cin >> buf;

    if (atoi(buf) != 0) {
      if (atoi(buf) <= MAX) {
        height[i] = atoi(buf);
        i++;
      }
    }
  }

  sort(height, height + SIZE, greater<int>());

  for (i = 0; i < TOP; i++) {
    cout << height[i] << endl;
  }

  return 0;
}

#include <algorithm>
#include <cstdio>
#include <functional>

#define SIZE 10
#define MAX 10000
#define TOP 3

using namespace std;

int main() {
  int i = 0;
  int buf;
  int height[SIZE];

  while (i < SIZE) {
    scanf("%d", &buf);

    height[i] = buf;

    ++i;
  }

  sort(height, height + SIZE, greater<int>());

  for (i = 0; i < TOP; ++i) {
    printf("%d\\n", height[i]);
  }

  return 0;
}


#include <algorithm>
#include <iostream>
using namespace std;

int Size = 10;

int main(void) {
  int height[Size];

  for (int i = 0; i < Size; ++i) {
    while (true) {
      cout << "No." << i + 1 << " : " << flush;
      cin >> height[i];
      if (height[i] > 0) {
        break;
      }
    }
  }
  sort(height, height + Size);

  cout << height[9] << endl << height[8] << endl << height[7] << endl;
}

#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int i;
  int list[10];
  for (i = 0; i < 10; i++) {
    cin >> list[i];
  }
  sort(list, list + 10);
  for (i = 0; i < 3; i++) {
    cout << list[9 - i] << endl;
  }
  return 0;
}


/* AOJ0001 */
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  int h;
  vector<int> most;
  while (cin >> h, h) {
    most.push_back(h);
  }
  sort(most.rbegin(), most.rend());
  for (int i = 0; i < 3; i++) {
    cout << most[i] << endl;
  }
}

/* AOJ0001 */
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  int h, most[10];
  for (int i = 0; i < 10; i++) {
    cin >> most[i];
  }
  sort(most, most + 10, greater<int>());
  for (int i = 0; i < 3; i++) {
    cout << most[i] << endl;
  }
}

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc


#include <iostream>
using namespace std;
int main() {
  int yama[9];
  int x, y, z, a;
  for (x = 0; x < 10; x++) {
    cin >> yama[x];
  }
  for (y = 0; y < 10000; y++) {
    if (yama[y] > yama[y + 1]) {
      z = yama[y];
      yama[y] = yama[y + 1];
      yama[y + 1] = z;
    } else {
      a++;
    }
    if (y == 8) {
      if (a == 9) {
        break;
      } else {
        y = 0;
        a = 0;
      }
    }
  }
  cout << yama[9] << endl;
  cout << yama[8] << endl;
  cout << yama[7] << endl;
  return 0;
}

#include <iostream>
using namespace std;
int main() {
  int a, b, c = 0, d;
  int yama[10];
  int hyama[3];
  for (a = 0; a < 10; a++) {
    cin >> yama[a];
  }
  for (a = 0;; a++) {
    if (a == 9) {
      a = 0;
      c = 0;
    }
    if (yama[a] < yama[a + 1]) {
      b = yama[a];
      yama[a] = yama[a + 1];
      yama[a + 1] = b;
    } else {
      c++;
    }
    if (c == 9) {
      break;
    }
  }
  for (a = 0; a < 3; a++) {
    cout << yama[a] << endl;
  }
  return 0;
}


#include <algorithm>
#include <iostream>

using namespace std;

int main() {
  int i, m[10];

  for (i = 0; i < 10; i++) {
    while (1) {
      cin >> m[i];
      if (m[i] > 0 && m[i] < 10001)
        break;
    }
  }

  sort(m, m + 10);

  for (i = 9; i > 6; i--) {
    cout << m[i] << endl;
  }
}

#include <algorithm>
#include <iostream>

using namespace std;

int main() {
  int i, m[10];

  for (i = 0; i < 10; i++) {
    cin >> m[i];
  }

  sort(m, m + 10);

  for (i = 9; i > 6; i--) {
    cout << m[i] << endl;
  }
}


#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <vector>

using namespace std;

const int numOfMountain = 10;

int main(int argc, char **argv) {
  int mountainBuf;
  vector<int> mountains;

  for (int i = 0; i <= numOfMountain; i++) {
    mountainBuf = atoi(argv[i]);
    mountains.push_back(mountainBuf);
  }

  sort(mountains.begin(), mountains.end());

  vector<int>::iterator out = mountains.end();
  for (int i = 0; i < 3; i++) {
    out--;
    cout << *out << endl;
  }

  return 0;
}

#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <vector>

using namespace std;

const int numOfMountain = 10;

int main() {
  int mountainBuf;
  vector<int> mountains;

  for (int i = 0; i < numOfMountain; i++) {
    cin >> mountainBuf;
    mountains.push_back(mountainBuf);
  }

  sort(mountains.begin(), mountains.end());

  vector<int>::iterator out = mountains.end();
  for (int i = 0; i < 3; i++) {
    out--;
    cout << *out << endl;
  }

  return 0;
}


#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <iostream>

#define BOGO 10

using namespace std;

int main() {
  int arr[BOGO];
  srand(static_cast<unsigned int>(time(NULL)));

  for (int i = 0; i < BOGO; i++) {
    cin >> arr[i];
  }

  for (;;) {

    /**
    for(int j = 0; j < BOGO; j++){
            cout << arr[j] << flush;
    }
    cout << endl;
    /**/

    bool found = true;
    for (int j = 0; j < BOGO - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        found = false;
        break;
      }
    }

    if (found) {
      break;
    }
    random_shuffle(arr, arr + BOGO);
  }
  cout << arr[9] << "\\n" << arr[8] << "\\n" << arr[7] << endl;
}

#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <iostream>

#define BOGO 10

using namespace std;

int main() {
  int arr[BOGO];
  bool found;
  int j;
  srand(static_cast<unsigned int>(time(NULL)));

  for (int i = 0; i < BOGO; i++) {
    cin >> arr[i];
  }

  for (;;) {

    /**
    for(int j = 0; j < BOGO; j++){
            cout << arr[j] << flush;
    }
    cout << endl;
    /**/

    found = true;
    for (j = 0; j < BOGO - 1; j++) {
      if (arr[j] > arr[j + 1]) {
        found = false;
        break;
      }
    }

    if (found) {
      break;
    }
    random_shuffle(arr, arr + BOGO);
  }
  cout << arr[9] << "\\n" << arr[8] << "\\n" << arr[7] << endl;
}


#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int height[10];
  for (int i = 0; i < 10; i++) {
    scanf("%d", &height[i]);
  }
  int temp;
  for (int i = 0; i < 10; i++) {
    for (int j = i + 1; j <= 10; j++) {
      if (height[i] < height[j]) {
        temp = height[i];
        height[i] = height[j];
        height[j] = temp;
      }
    }
  }

  for (int i = 0; i < 3; i++) {
    printf("%d\\n", height[i]);
  }
  return 0;
}

#include <bits/stdc++.h>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>

#include <cmath>
#include <fstream>
#include <iostream>

#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;

int main() {

  long long int n, i = 0, j, a, b, c, ln, my = 0, ck = 0;
  int arr[10];

  for (i = 0; i < 10; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + 10);

  cout << arr[9] << endl;
  cout << arr[8] << endl;
  cout << arr[7] << endl;
}


#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int i, j, temp, h[10];
  for (i = 0; i < 10; i++) {
    cin >> h[i];
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 10 - i; j++) {
      if (h[j] > h[j + 1]) {
        temp = h[j];
        h[j] = h[j + 1];
        h[j + 1] = temp;
      }
    }
  }
  for (i = 9; i > 6; i--) {
    cout << h[i] << endl;
  }
  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
  int i, f, s, t, h;
  f = -1;
  s = -1;
  t = -1;
  for (i = 0; i < 10; i++) {
    scanf("%d", &h);
    if (h > f) {
      t = s;
      s = f;
      f = h;
    } else if (h > s) {
      t = s;
      s = h;
    } else if (h > t) {
      t = h;
    }
  }
  printf("%d\\n%d\\n%d\\n", f, s, t);
  return 0;
}


#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;

int comparefunc(const void *a, const void *b) {
  return (*(int *)b - *(int *)a);
}

int main() {
  int height[10], i;
  while (1 != EOF) {
    for (i = 0; i < 10; i++) {
      scanf("%d", &height[i]);
    }
    qsort(height, 10, sizeof(int), comparefunc);

    for (i = 0; i < 3; i++) {
      printf("%d\\n", height[i]);
    }
  }
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[10], i;
  for (i = 0; i <= 9; i++)
    scanf("%d", &a[i]);
  sort(a, a + 10);
  printf("%d\\n%d\\n%d\\n", a[9], a[8], a[7]);
  return 0;
}


#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>

using namespace std;

int main() {
  int T, i, j, a[11];

  for (i = 1; i < 11; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i < 11; i++) {
    for (j = 1; j < 11; j++) {
      if (a[i] > a[j]) {
        T = a[i];
        a[i] = a[j];
        a[j] = T;
      }
    }
  }
  for (i = 1; i < 4; i++) {
    printf("%d\\n", a[i]);
  }

  return 0;
}


#include <stdio.h>
int main() {
  long long array1[11], array2[11], i, j, n, k = 0, temp, l, p = 0;

  scanf("%lld", &n);

  for (i = 0; i < n; i++) {
    scanf("%lld", &array1[i]);
  }
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (array1[i] > array1[j]) {
        temp = array1[i];
        array1[i] = array1[j];
        array1[j] = temp;
      }
    }
  }
  l = 0;
  for (k = n - 1; k >= 0; k--) {

    array2[l] = array1[k];
    l++;
  }

  for (p = 0; p < 3; p++) {
    printf("%lld\\n", array2[p]);
  }
  return 0;
}

#include <algorithm>
#include <cstdio>
#include <iostream>

using namespace std;

int main() {
  int a[10];
  int k;
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
    // a.push_back(k);
  }
  sort(a, a + 10);
  for (int j = 9; j >= 7; j--)
    cout << a[j] << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {

  int height[10];
  for (int i = 0; i < 10; i++) {
    cin >> height[i];
  }
  sort(height, height + 10);
  cout << height[9] << endl;
  cout << height[8] << endl;
  cout << height[7] << endl;
  return 0;
}


#include <algorithm>
#include <stdio.h>

using namespace std;
int main() {
  int a[100], i;
  int n = 10;
  scanf("%d", &n);

  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  printf("%d\\n%d\\n%d\\n", a[n - 1], a[n - 2], a[n - 3]);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;
int n, a[50];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    cin >> a[i];
  sort(a + 1, a + 1 + n);
  for (int i = n; i >= n - 2; i--) {
    cout << a[i] << endl;
  }
}

#include <bits/stdc++.h>
using namespace std;
int n, a[50];
int main() {
  n = 10;
  for (int i = 1; i <= n; i++)
    cin >> a[i];
  sort(a + 1, a + 1 + n);
  for (int i = n; i >= n - 2; i--) {
    cout << a[i] << endl;
  }
}


#include <iostream>
using namespace std;

int main() {
  bool flag;
  int result[3], buf, temp[10];
  for (int i = 0; i < 10; i++) {
    cin >> temp[i];
  }
  for (int l = 0; l < 3; l++) {
    while (1) {
      for (int j = l; j < 9; j++) {
        if (temp[j] < temp[j + 1]) {
          buf = temp[j + 1];
          temp[j + 1] = temp[j];
          temp[j] = buf;
        }
      }
      flag = false;
      for (int k = 0; k < 9; k++) {
        if (temp[l] < temp[k])
          flag = true;
      }
      if (flag != true) {
        result[l] = temp[l];
        break;
      }
    }
  }
  cout << result[0] << endl;
  cout << result[1] << endl;
  cout << result[2] << endl;
  return 0;
}

#include <iostream>
using namespace std;

int main() {
  bool flag;
  int result[3], buf, temp[10];
  for (int i = 0; i < 10; i++) {
    cin >> temp[i];
  }
  for (int l = 0; l < 3; l++) {
    while (1) {
      for (int j = l; j < 9; j++) {
        if (temp[j] < temp[j + 1]) {
          buf = temp[j + 1];
          temp[j + 1] = temp[j];
          temp[j] = buf;
        }
      }
      flag = false;
      for (int k = l; k < 9; k++) {
        if (temp[l] < temp[k])
          flag = true;
      }
      if (flag != true) {
        result[l] = temp[l];
        break;
      }
    }
  }
  cout << result[0] << endl;
  cout << result[1] << endl;
  cout << result[2] << endl;
  return 0;
}


#include <stdio.h>
int main(void) {
  int a = 0, b = 0, c = 0, n, t;
  while (scanf("%d", &n)) {
    if (n > a)
      t = n, n = a, a = t;
    if (n > b)
      t = n, n = b, b = t;
    if (n > c)
      c = n;
  }
  printf("%d\\n%d\\n%d\\n", a, b, c);
  return 0;
}

#include <stdio.h>
int main(void) {
  int a = 0, b = 0, c = 0, n, t;
  while (scanf("%d", &n) > 0) {
    if (n > a)
      t = n, n = a, a = t;
    if (n > b)
      t = n, n = b, b = t;
    if (n > c)
      c = n;
  }
  printf("%d\\n%d\\n%d\\n", a, b, c);
  return 0;
}


#include <stdio.h>
int main() {
  int number[30];
  int i, j, a, n;
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    scanf("%d", &number[i]);
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      if (number[i] < number[j]) {
        a = number[i];
        number[i] = number[j];
        number[j] = a;
      }
    }
  }
  for (i = 0; i < 3; i++)
    printf("%d\\n", number[i]);
}

#include <cstdio>
#include <iostream>

using namespace std;

int main() {
  int hM[10], I, K, temp;

  for (I = 0; I < 10; I = I + 1)
    scanf("%d", &hM[I]);

  for (I = 0; I < 9; I = I + 1)
    for (K = 0; K < 9 - I; K = K + 1)
      if (hM[K] < hM[K + 1]) {
        temp = hM[K];
        hM[K] = hM[K + 1];
        hM[K + 1] = temp;
      }

  for (I = 0; I < 3; I = I + 1)
    printf("%d\\n", hM[I]);

  return 0;
}


#include <algorithm>
#include <cstdio>
#include <functional>

using namespace std;

int main() {
  int a[10];
  for (int i = 0; i < 10; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + 10, greater<int>());
  printf("%d\\n%d\\n%d\\n", a[0], a[1], a[2]);
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int f = 0, s = 0, t = 0, tmp;
  while (cin >> tmp, tmp != EOF) {
    if (f < tmp) {
      f = tmp;
    } else if (s < tmp) {
      s = tmp;
    } else if (t < tmp) {
      t = tmp;
    }
  }
  cout << f << endl;
  cout << s << endl;
  cout << t << endl;
  return 0;
}

#include <algorithm>
#include <functional>
#include <iostream>
using namespace std;

int main() {
  int h[10], tmp;
  for (int i = 0; i < 10; i++)
    cin >> h[i];
  sort(h, h + 10, greater<int>());
  for (int i = 0; i < 3; i++)
    cout << h[i] << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int m[10];
  for (int i = 0; i < 9; i++)
    cin >> m[i];
  sort(m, m + 10);
  for (int i = 9; i > 6; i++)
    cout << m[i] << endl;

  return 0;
}

#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  int m[10];
  for (int i = 0; i < 10; i++)
    cin >> m[i];
  sort(m, m + 10);
  for (int i = 9; i > 6; i--)
    cout << m[i] << endl;

  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int nya[9];
  int hoge;
  for (int j = 0; j < 10; j++) {
    cin >> nya[j];
  }
  for (int i = 0; i < 20; i++) {
    for (int k = 1; k < 10; k++) {
      if (nya[k] > nya[k - 1]) {
        hoge = nya[k - 1];
        nya[k - 1] = nya[k];
        nya[k] = hoge;
      }
    }
  }
  cout << nya[0] << endl << nya[1] << endl << nya[2] << endl;
  return 0;
}

#include <iostream>
using namespace std;

int main() {
  int nya[10];
  int hoge;
  for (int j = 0; j < 10; j++) {
    cin >> nya[j];
  }
  for (int i = 0; i < 20; i++) {
    for (int k = 1; k < 10; k++) {
      if (nya[k] > nya[k - 1]) {
        hoge = nya[k - 1];
        nya[k - 1] = nya[k];
        nya[k] = hoge;
      }
    }
  }
  //	for(int i=0;i<10;++i)	cout << nya[i] <<endl;
  cout << nya[0] << endl << nya[1] << endl << nya[2] << endl;
  return 0;
}


#include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
  const int N = 10;
  int height[N];
  for (int i = 0; i < 10; i++) {
    scanf("%d", height[i]);
  }
  sort(height, height + N);
  reverse(height, height + N);
  for (int j = 0; j < 3; j++) {
    printf("%d", height[j]);
  }
  return 0;
}

#include <algorithm>
#include <stdio.h>
using namespace std;
int main() {
  const int N = 10;
  int height[N];
  for (int i = 0; i < 10; i++) {
    scanf("%d", &height[i]);
  }
  sort(height, height + N);
  reverse(height, height + N);
  for (int j = 0; j < 3; j++) {
    printf("%d\\n", height[j]);
  }
  return 0;
}


#include <algorithm>
#include <iostream>

using namespace ::std;

int main() {
  int array[10];

  for (int i = 0; i < 10; i++)
    cin >> array[i];

  sort(array, array + 10);

  for (int i = 9; i > 6; i++)
    cout << array[i] << endl;
  return 0;
}

#include <algorithm>
#include <iostream>

using namespace ::std;

int main() {
  int array[10];

  for (int i = 0; i < 10; i++)
    cin >> array[i];

  sort(array, array + 10);

  for (int i = 9; i > 6; i--)
    cout << array[i] << endl;
  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
  vector<int> line;
  int pro;
  for (int i = 0; i < 10; ++i) {
    cin >> pro;
    line.push_back(pro);
  }
  sort(line.begin(), line.end());
  for (int i = 9; i > 6; -i) {
    cout << line[i] << endl;
  }
  return 0;
}

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
  vector<int> line;
  int pro;
  for (int i = 0; i < 10; ++i) {
    cin >> pro;
    line.push_back(pro);
  }
  sort(line.begin(), line.end());
  for (int i = 9; i > 6; --i) {
    cout << line[i] << endl;
  }
  return 0;
}


//	created : 16/03/15
// 	author   : Rp7rf
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <set>
#include <vector>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define rep(i, a) for (int i = 0; i < a; i++)
#define loop(i, a, b) for (int i = a; i < b; i++)
#define vi vector<int>
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define INF 1e9

int main(void) {
  int q;
  string a, b;
  cin >> q;
  while (q--) {
    cin >> a >> b;
    int dp[1010][1010] = {0};
    for (int j = 0; j < a.size(); j++) {
      for (int i = 0; i < b.size(); i++) {
        if (a[j] == b[i]) {
          dp[j + 1][i + 1] = dp[j][i] + 1;
        } else {
          dp[j + 1][i + 1] = max(dp[j][i + 1], dp[j + 1][i]);
        }
      }
    }
    cout << dp[a.size()][b.size()] << endl;
  }
}

#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
using namespace std;

const int MAX = 10000100;

#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define all(a) (a).begin(), (a).end()
#define ll long long int
#define gcd(a, b) __gcd(a, b)
#define pb(a) push_back(a)
int GCD(int a, int b) {
  if (!b)
    return a;
  return gcd(b, a % b);
}
int lcm(int a, int b) { return a * b / gcd(a, b); }

int main(void) {
  int a[10];
  rep(i, 10) cin >> a[i];
  sort(a, a + 10, greater<int>());
  rep(i, 3) cout << a[i] << endl;
}


#include <algorithm>
#include <cstdio>

using namespace std;

const int N = 10;
int a[N];

int main() {
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + N);
  for (int i = N - 1; i > N - 4; i++)
    printf("%d/n", a[i]);
}

#include <algorithm>
#include <cstdio>

using namespace std;

const int N = 10;
int a[N];

int main() {
  for (int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + N);
  for (int i = 1; i < 4; i++)
    printf("%d\\n", a[N - i]);
}


#include <algorithm>
#include <iostream>

int main() {
  int h[10];
  for (int n = 0; n < 10; n++) {
    using std::cin;
    cin >> h[n];
  }
  using std::sort;
  sort(h + 10, h);
  for (int n = 0; n < 3; n++) {
    using std::cout;
    using std::endl;
    cout << h[n] << endl;
  }
  return 0;
}

#include <algorithm>
#include <functional>
#include <iostream>
int main() {
  int h[10];
  for (int n = 0; n < 10; n++) {
    using std::cin;
    cin >> h[n];
  }
  using std::greater;
  using std::sort;
  sort(h, h + 10, greater<int>());
  for (int n = 0; n < 3; n++) {
    using std::cout;
    using std::endl;
    cout << h[n] << endl;
  }
  return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main(void) {
  vector<int> a;
  int b;

  for (int i = 0; i < 10; i++) {
    cin >> b;
    a.push_back(b);
  }

  while (1)
    ;

  sort(a.begin(), a.end());
  cout << a[9] << endl << a[8] << endl << a[7] << endl;

  return 0;
}

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main(void) {
  vector<int> a;
  int b;

  for (int i = 0; i < 10; i++) {
    scanf("%d", &b);
    a.push_back(b);
  }
  sort(a.begin(), a.end());
  printf("%d\\n%d\\n%d\\n", a[9], a[8], a[7]);

  return 0;
}


#include <algorithm>
#include <stdio.h>
#include <vector>

int main() {
  int i;
  int input;
  std::vector<int> height;
  for (i = 0; i < 10; i++) {
    scanf("%d", &input);
    height[i] = input;
  }

  std::sort(height.begin(), height.end());

  printf("%d\\n", height[0]);
  printf("%d\\n", height[1]);
  printf("%d\\n", height[2]);

  return 0;
}

#include <algorithm>
#include <stdio.h>
#include <vector>

int main() {
  int i;
  int input;
  std::vector<int> height;
  for (i = 0; i < 10; i++) {
    scanf("%d", &input);
    height.push_back(input);
  }

  std::sort(height.begin(), height.end());

  printf("%d\\n", height[9]);
  printf("%d\\n", height[8]);
  printf("%d\\n", height[7]);

  return 0;
}


#include <stdio.h>

int main() {
  int height[10], rank[3] = {0};
  int i;

  for (i = 0; i < 10; i++) {
    scanf("%d\\n", height[i]);

    if (rank[0] < height[i]) {
      rank[2] = rank[1];
      rank[1] = rank[0];
      rank[0] = height[i];
    } else if (rank[1] < height[i]) {
      rank[2] = rank[1];
      rank[1] = height[i];
    } else if (rank[2] < height[i]) {
      rank[2] = height[i];
    }
  }

  for (i = 0; i < 3; i++) {
    printf("%d\\n", rank[i]);
  }

  return 0;
}

#include <stdio.h>

int main() {
  int height[10], rank[3] = {0};
  int i;

  for (i = 0; i < 10; i++) {
    scanf("%d\\n", &height[i]);

    if (rank[0] < height[i]) {
      rank[2] = rank[1];
      rank[1] = rank[0];
      rank[0] = height[i];
    } else if (rank[1] < height[i]) {
      rank[2] = rank[1];
      rank[1] = height[i];
    } else if (rank[2] < height[i]) {
      rank[2] = height[i];
    }
  }

  for (i = 0; i < 3; i++) {
    printf("%d\\n", rank[i]);
  }

  return 0;
}


#include <stdio.h>
int main() {
  int n, m[10000], i, sum;
  while (1) {
    sum = 0;
    scanf("%d", &n);
    if (n == 0)
      break;
    for (i = 0; i < n / 4; i++) {
      scanf("%d", &m[i]);
      sum += m[i];
    }
    printf("%d\\n", sum);
  }
  return 0;
}

#include <stdio.h>
int main() {
  int f = 0, s = 0, t = 0, m, i;
  for (i = 0; i < 10; i++) {
    scanf("%d", &m);
    if (m > f) {
      t = s;
      s = f;
      f = m;
    } else if (m > s) {
      t = s;
      s = m;
    } else if (m > t) {
      t = m;
    }
  }
  printf("%d\\n%d\\n%d\\n", f, s, t);
  return 0;
}


#include <iostream>
using namespace std;
int main() {
  int takasa[10];
  for (int i = 0; i < 10; i++) {
    cin >> takasa[i];
  }
  for (int i = 0; i < 9; i++) {
    for (int j = i + 1; j < 10; j++) {
      if (takasa[i] < takasa[j]) {
      }
    }
  }
  for (int i = 0; i, 3; i++) {
    cout << takasa[i];
  }
  return 0;
}

#include <iostream>
using namespace std;
int main() {
  int takasa[10];
  for (int i = 0; i < 10; i++) {
    cin >> takasa[i];
  }
  for (int i = 0; i < 9; i++) {
    for (int j = i + 1; j < 10; j++) {
      if (takasa[i] < takasa[j]) {
        swap(takasa[i], takasa[j]);
      }
    }
  }
  for (int i = 0; i < 3; i++) {
    cout << takasa[i] << endl;
  }
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int x, i, n;
  i = 1;
  cin >> n;
  3 <= n <= 10000;
  while (i <= n) {
    x = i;
    if (x % 3 == 0) {
      cout << " " << i;
    } else if (x % 10 != 0) {
      while (x % 10 > 0) {
        if (x % 10 == 3)
          cout << " " << i;
      }
      x /= 10;
    }
    i++;
  }
  cout << endl;
}

#include <iostream>
using namespace std;
int main() {
  int high[11], i, j;
  for (i = 1; i <= 10; i++) {
    cin >> high[i];
  }
  for (i = 1; i <= 10; i++) {
    for (j = 1; j <= 10; j++) {
      if (high[i] > high[j])
        swap(high[i], high[j]);
    }
  }
  for (i = 1; i <= 3; i++)
    cout << high[i] << endl;
}


#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T> inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e) != (s).end())
#define EXIST2(s, e) (find(ALL(s), (e)) != (s).end())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define EACH(t, i, c) for (t::iterator i = (c).begin(); i != (c).end(); ++i)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
  vi a;
  REP(i, 10) { cin >> a[i]; }
  sort(RALL(a));
  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
}

#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T> inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e) != (s).end())
#define EXIST2(s, e) (find(ALL(s), (e)) != (s).end())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define EACH(t, i, c) for (t::iterator i = (c).begin(); i != (c).end(); ++i)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
  vi a(10);
  REP(i, 10) { cin >> a[i]; }
  sort(RALL(a));
  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
}


#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  vector<int> v;
  int num;
  for (int i = 0; i < 10; i++) {
    cin >> num;
    v.push_back(num);
  }

  sort(v.end(), v.begin(), greater<int>());

  for (int i = 0; i < 3; i++)
    cout << v.at(i);
  return 0;
}

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
  vector<int> v;
  int num;
  for (int i = 0; i < 10; i++) {
    cin >> num;
    v.push_back(num);
  }

  sort(v.begin(), v.end(), greater<int>());

  for (int i = 0; i < 3; i++)
    cout << v.at(i) << endl;
  return 0;
}


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

int main() {
  vector<int> mountain;
  for (int i = 0; i < 10; i++) {
    cin >> mountain.at(i);
  }
  sort(mountain.begin(), mountain.end());
  reverse(mountain.begin(), mountain.end());

  for (int i = 0; i < 3; i++) {
    cout << mountain.at(i) << endl;
  }
}

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

int main() {
  vector<int> mountain(10);
  for (int i = 0; i < 10; i++) {
    cin >> mountain.at(i);
  }
  sort(mountain.begin(), mountain.end());
  reverse(mountain.begin(), mountain.end());

  for (int i = 0; i < 3; i++) {
    cout << mountain.at(i) << endl;
  }
}

terminate called after throwing an instance of 'std::out_of_range'
  what():  vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)


#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>

bool compare(int a, int b) { return a < b; }

int main(void) {
  int i;
  std::vector<int> hs(0, 10);

  for (i = 0; i < 10; i++) {
    std::cin >> hs[i];
  }

  std::sort(hs.begin(), hs.end(), std::greater<int>());

  for (i = 0; i < 3; i++) {
    std::cout << hs[i] << "\\n";
  }

  return 0;
}

#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>

using namespace std;

int main(void) {
  int i;
  int hs[10];

  for (i = 0; i < 10; i++) {
    cin >> hs[i];
  }

  sort(hs, hs + 10, greater<int>());

  for (i = 0; i < 3; i++) {
    cout << hs[i] << "\\n";
  }

  return 0;
}


#include <cstdlib>
#include <fstream>
#include <iostream>

int main(int argc, char *argv[]) {
  std::ifstream datafile(argv[1]); // input datafile
  std::string str;
  int mt_height[10] = {}; // height of mountain
  int ans[3] = {}; // top 3 height of mountain. 0 -> no.1 1 -> no.2 2 -> no.3

  if (datafile.fail()) {
    std::cout << "error : can't open this file." << std::endl;
    exit(1);
  }

  // input 10 height of mountain
  for (size_t i = 0; i < 10; i++) {
    std::getline(datafile, str);
    sscanf(str.c_str(), "%d", &mt_height[i]);

    if ((mt_height[i] < 0) || (mt_height[i] > 10000)) {
      std::cout << "error : out of constraints" << std::endl;
      exit(1);
    }
  }

  // select top 3 height of mountain and sort ans[]
  for (size_t i = 0; i < 10; i++) {
    if (ans[0] < mt_height[i]) {
      ans[2] = ans[1];
      ans[1] = ans[0];
      ans[0] = mt_height[i];
    } else if (ans[1] < mt_height[i]) {
      ans[2] = ans[1];
      ans[1] = mt_height[i];
    } else if (ans[2] < mt_height[i]) {
      ans[2] = mt_height[i];
    }
  }

  // output ans[]
  for (size_t i = 0; i < 3; i++) {
    std::cout << ans[i] << std::endl;
  }

  return 0;
}

#include <cstdlib>
#include <fstream>
#include <iostream>

int main(int argc, char *argv[]) {
  //	std::ifstream datafile(argv[1]); //input datafile
  std::string str;
  int mt_height[10] = {}; // height of mountain
  int ans[3] = {}; // top 3 height of mountain. 0 -> no.1 1 -> no.2 2 -> no.3

  // if(datafile.fail()){
  // 	std::cout << "error : can't open this file." << std::endl;
  // 	exit(1);
  // }

  // input 10 height of mountain
  for (size_t i = 0; i < 10; i++) {
    std::getline(std::cin, str);
    sscanf(str.c_str(), "%d", &mt_height[i]);

    if ((mt_height[i] < 0) || (mt_height[i] > 10000)) {
      std::cout << "error : out of constraints" << std::endl;
      exit(1);
    }
  }

  // select top 3 height of mountain and sort ans[]
  for (size_t i = 0; i < 10; i++) {
    if (ans[0] < mt_height[i]) {
      ans[2] = ans[1];
      ans[1] = ans[0];
      ans[0] = mt_height[i];
    } else if (ans[1] < mt_height[i]) {
      ans[2] = ans[1];
      ans[1] = mt_height[i];
    } else if (ans[2] < mt_height[i]) {
      ans[2] = mt_height[i];
    }
  }

  // output ans[]
  for (size_t i = 0; i < 3; i++) {
    std::cout << ans[i] << std::endl;
  }

  return 0;
}


#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>

using namespace std;

int main() {
  int a[9];
  for (int i = 0; i <= 9; i++)
    std::cin >> a[i];
  std::sort(a, a + 10, greater<int>()); // ツソツーツトツつキツづゥツ。
  for (int j = 0; j < 3; j++) {
    std::cout << a[j]
              << ", "; // ツ個仰嘉環づーツプツδ環δ督トツつオツづづ敖づゥツ。
  }
  return 0;
}

#include <algorithm>
#include <functional>
#include <iostream>
using namespace std;
int main() {
  int a[10];
  for (int i = 0; i <= 9; i++)
    std::cin >> a[i];
  std::sort(a, a + 10, greater<int>());
  for (int j = 0; j < 3; j++) {
    std::cout << a[j] << endl;
  }
  return 0;
}


#include <iostream>
#include <vector>
using namespace std;

void bubbleSort(vector<int> &h) {
  int tmp;
  for (int i = 0; i < h.size() - 1; i++) {
    for (int j = 0; j < h.size() - 1 - i; j++) {
      if (h[j] < h[j + 1]) {
        tmp = h[j + 1];
        h[j + 1] = h[j];
        h[j] = tmp;
      }
    }
  }
}

int main() {
  vector<int> height(10);
  for (int i = 0; i < 10; i++) {
    cin >> height[i];
  }
  bubbleSort(height);
  for (int i : height) {
    cout << i << endl;
  }
  return 0;
}

#include <iostream>
#include <vector>
using namespace std;

void bubbleSort(vector<int> &h) {
  int tmp;
  for (int i = 0; i < h.size() - 1; i++) {
    for (int j = 0; j < h.size() - 1 - i; j++) {
      if (h[j] < h[j + 1]) {
        tmp = h[j + 1];
        h[j + 1] = h[j];
        h[j] = tmp;
      }
    }
  }
}

int main() {
  vector<int> height(10);
  for (int i = 0; i < 10; i++) {
    cin >> height[i];
  }
  bubbleSort(height);
  for (int i = 0; i < 3; i++) {
    cout << height[i] << endl;
  }
  return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> ivector;

int main() {
  int a, b;
  while (scanf("%d,%d", a, b) != EOF) {
    int dat = log10(a + b);
    cout << dat << endl;
  }

  return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <string>
#include <vector>
using namespace std;
typedef vector<int> ivector;

int main() {
  int a, b;
  while (scanf("%d %d", &a, &b) != EOF) {
    int dat = log10(a + b);
    cout << dat + 1 << endl;
  }

  return 0;
}


#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>

using namespace std;

int main(int argc, char *argv[]) {
  int a, b;
  while (cin >> a >> b) {
    int sum = a + b;
    int cnt = 1;
    while (sum / 10) {
      cnt++;
    }
    cout << cnt << endl;
  }
  return 0;
}

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>

using namespace std;

int main(int argc, char *argv[]) {
  int a, b;
  while (cin >> a >> b) {
    int sum = a + b;
    int cnt = 1;
    while (sum /= 10) {
      cnt++;
    }
    cout << cnt << endl;
  }
  return 0;
}


#include <stdio.h>
int main(void) {
  int a, b, i = 1;
  while (1) {
    scanf("%d %d", &a, &b);
    a = a + b;
    for (i = 1; i < 8; i++) {
      if (a < 10)
        break;
      a = a / 10;
    }
    printf("%d\\n", i);
  }
  return 0;
}

#include <stdio.h>
int main(void) {
  int a, b, i, k;
  while (scanf("%d %d", &a, &b) != EOF) {
    a = a + b;
    for (i = 1; i < 8; i++) {
      if (a < 10)
        break;
      a = a / 10;
    }
    printf("%d\\n", i);
  }
  return 0;
}


#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {

  string str;
  do {

    string item;
    vector<string> list;
    getline(cin, str);

    stringstream ss(str);
    while (getline(ss, item, ' ') && !item.empty()) {
      list.push_back(item);
    }
    int sum = stoi(list[0].c_str()) + stoi(list[1].c_str());
    int count = 0;
    for (int i = 10; i <= 1000000; i = i * 10) {
      count++;
      if (sum < i) {
        cout << count << endl;
        break;
      }
    }
  } while (str != "");
  return 0;
}

#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
int main() {

  int len[200];
  int max = 0;
  for (int num = 0; num < 200; num++) {
    string str;
    string item;
    vector<string> list;
    getline(cin, str);
    if (str == "") {
      break;
    }

    stringstream ss(str);
    while (getline(ss, item, ' ') && !item.empty()) {
      list.push_back(item);
    }
    int sum = stoi(list[0].c_str()) + stoi(list[1].c_str());
    int count = 0;
    for (int i = 10; i <= 10000000; i = i * 10) {
      count++;
      if (sum < i) {
        len[num] = count;
        max++;
        break;
      }
    }
  }
  for (int num = 0; num < max; num++) {
    cout << len[num] << endl;
  }
  return 0;
}


#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 // 10^9+7
#define INF 1000000000 // 10^9

int main(int argc, const char *argv[]) {
  double a, b;
  while (1) {
    cin >> a >> b;
    if (a == 0 && b == 0)
      return 0;
    int k = log10(a + b) + 1;
    cout << k;
  }
}

#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 // 10^9+7
#define INF 1000000000 // 10^9

int main() {
  string str;
  while (getline(cin, str)) {
    bool f = 0;
    int a = 0, b = 0;
    for (int i = 0; i < (int)str.length(); i++) {
      if (str[i] == ' ')
        f = 1;
      else if (!f)
        a = a * 10 + (str[i] - '0');
      else
        b = b * 10 + (str[i] - '0');
    }
    cout << (int)log10(a + b) + 1 << endl;
  }
}


#include <iostream>

using namespace std;
int main() {
  int a, b;
  while (true) {
    cin >> a >> b;
    if (a == EOF) {
      return 0;
    }
    a += b;
    int i = 0;
    while (a > 0) {
      a /= 10;
      i++;
    }

    cout << i << endl;
  }
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  int a, b;
  while ((scanf("%d %d", &a, &b)) != EOF) {
    a += b;
    int i = 0;
    while (a > 0) {
      a /= 10;
      i++;
    }

    cout << i << endl;
  }
  return 0;
}


#include <iostream>
#include <string>
using namespace std;
int main() {
  int a, b;
  while (1) {
    cin >> a;
    if (a < 0) {
      break;
    }
    cin >> b;
    auto sum = a + b;
    string str(to_string(sum));
    cout << str.size();
  }
}

#include <iostream>
#include <sstream>
#include <string>

using namespace std;

int main() {
  int a, b;
  while (cin >> a) {
    cin >> b;
    int sum = a + b;
    stringstream ss;
    ss << sum;
    string str(ss.str());
    cout << str.size() << endl;
  }
}


#include <cstdio>
int main() {
  int a, b;
  char s[256], cmd[256];
  while (1) {
    fgets(s, 256, stdin);
    sscanf(s, "%s", cmd);
    if (cmd == "EOF") {
      break;
    }

    sscanf(s, "%d %d", &a, &b);
    int c = a + b, counter = 0;
    while (((int)c / 10) >= 1) {
      counter++;
      c = (int)c / 10;
    }

    printf("%d\\n", counter + 1);
  }
  return 0;
}

#include <iostream>
using namespace std;
int main() {
  long long a, b;
  while (1) {
    cin >> a >> b;
    if (cin.eof()) {
      break;
    }
    long long sum = a + b;
    int cnt = 1;
    while (sum / 10 >= 1) {
      sum /= 10;
      cnt++;
    }
    cout << cnt << endl;
  }
  return 0;
}


#include <cmath>
#include <iostream>
using namespace std;

int main() {
  while (1) {
    int a, b;
    cin >> a >> b;
    int digit = log10(a + b) + 1;
    cout << digit << endl;
  }
}

#include "bits/stdc++.h"

using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    int digit = log10(a + b) + 1;
    cout << digit << endl;
  }
}


#include <iostream>
using namespace std;
class DigitNumber {
public:
  void solve(int a, int b) {
    string sum = to_string(a + b);
    if (sum == "0")
      cout << 0 << endl;
    else
      cout << sum.length() << endl;
  }
};
int main() {
  DigitNumber inst;
  int a, b;
  while (true) {
    cin >> a >> b;
    inst.solve(a, b);
  }
}

#include <iostream>
using namespace std;
class DigitNumber {
public:
  void solve(int a, int b) {
    string sum = to_string(a + b);
    if (sum == "0")
      cout << 0 << endl;
    else
      cout << sum.length() << endl;
  }
};
int main() {
  DigitNumber inst;
  int a, b;
  while (cin >> a >> b) {
    inst.solve(a, b);
  }
}


#include <stdio.h>
#include <string.h>

int main(void) {
  int sum = 0;
  char a;

  while (1) {
    sum = 0;
    while (scanf("%c", &a), a != ' ')
      sum++;
    while (scanf("%c", &a), a != '\\n')
      sum++;
    printf("%d\\n", sum);
  }

  return 0;
}

#include <math.h>
#include <stdio.h>

int main(void) {
  int i, x;
  int a, b;

  while (scanf("%d %d", &a, &b) != EOF) {
    for (i = 0, x = a + b; x >= 1; x /= 10, i++)
      ;
    printf("%d\\n", i);
  }

  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int a, b;
  while (1) {

    cin >> a >> b;
    if (a == 0 && b == 0)
      break;
    int c = a + b;
    int ans = 0;
    while (c != 0) {
      c /= 10;
      ans++;
    }
    cout << ans << endl;
  }
  return 0;
}

#include <iostream>
using namespace std;

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


#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
  int a, b, c;
  char ans[100];
  while (1) {
    cin >> a >> b;
    sprintf(ans, "%d", a + b);
    c = strlen(ans);
    cout << c << endl;
  }
  return 0;
}

#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main() {
  int a, b, c;
  char ans[100];
  while (cin >> a >> b) {
    sprintf(ans, "%d", a + b);
    c = strlen(ans);
    cout << c << endl;
  }
  return 0;
}


#include <algorithm>
#include <iostream>
using namespace std;

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

#include <algorithm>
#include <iostream>
using namespace std;

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


#include <cstdio>
using namespace std;
int main() {
  int a, b;
  while (scanf("%d %d", &a, &b)) {
    char c[255];
    printf("%d\\n", sprintf(c, "%d", a + b));
  }
  return 0;
}

#include <cstdio>
using namespace std;
int main() {
  int a, b;
  while (scanf("%d %d", &a, &b) != EOF) {
    char c[255];
    printf("%d\\n", sprintf(c, "%d", a + b));
  }
  return 0;
}


/*****include*****/
#include <fstream>
#include <iostream>

/*****デバッグ定義*****/
// #define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main() {
  /*****ファイルオープン*****/
#ifdef DEBUG
  ofstream fout("output.txt");
  ifstream fin("input.txt");
  if (!fout || !fin) {
    cout << "Can't open the file.\\n";
    return;
  }
#endif
  /*****変数置き場*****/
  int int_a, int_b;
  int num;
  while (1) {
    num = 0;
    cin >> int_a >> int_b;
    int_a += int_b;
    while (int_a / 10 != 0) {
      int_a = int_a / 10;
      num++;
    }
    cout << num + 1 << endl;
  }
  /*****処理部*****/

  /*****処理終了後*****/
#ifdef DEBUG
  fout.close();
  fin.close();
#endif
  return 0;
}

#include <stdio.h>

int main(void) {
  unsigned long int i, j, sum;
  unsigned int count = 0;
  while (1) {
    if (scanf("%ld %ld", &i, &j) == EOF)
      break;

    sum = i + j;
    count = 0;
    for (unsigned long int dec = 10; dec <= 1000000; dec *= 10) {
      if (sum < dec)
        break;
      count++;
    }
    printf("%d\\n", count + 1);
  }
  return 0;
}


#include <iostream>

using namespace std;

int main() {

  int a, b;
  int s, k = 0;

  while (1) {
    cin >> a >> b;
    if (a < 0 || b < 0)
      break;
    s = a + b;
    while (s != 0) {
      s = s / 10;
      k++;
    }
    cout << k << endl;
  }
}

#include <iostream>

using namespace std;

int main() {

  int a, b;
  int s, k;

  while (cin >> a >> b) {
    s = a + b;
    k = 0;
    while (s != 0) {
      s = s / 10;
      k++;
    }
    cout << k << endl;
  }
}


// 泥臭いなあ
#include <cstdio>
#include <iostream>

int main() {
  using namespace std;
  long int a, b;
  unsigned long int div;

  while (1) {

    cin >> a;
    if (a == EOF)
      break;
    cin >> b;
    div = (a + b) / 10;

    if (div == 0)
      cout << 1 << "\\n";
    else if (1 <= div && div <= 9)
      cout << 2 << "\\n";
    else if (10 <= div && div <= 99)
      cout << 3 << "\\n";
    else if (100 <= div && div <= 999)
      cout << 4 << "\\n";
    else if (1000 <= div && div <= 9999)
      cout << 5 << "\\n";
    else if (10000 <= div && div <= 99999)
      cout << 6 << "\\n";
    else if (100000 <= div && div <= 200000)
      cout << 7 << "\\n";
  }

  return 0;
}

// 泥臭いなあ
#include <cstdio>
#include <iostream>

int main() {
  using namespace std;
  long int a, b;
  unsigned long int div;

  while (cin >> a >> b) {

    div = (a + b) / 10;

    if (div == 0)
      cout << 1 << "\\n";
    else if (1 <= div && div <= 9)
      cout << 2 << "\\n";
    else if (10 <= div && div <= 99)
      cout << 3 << "\\n";
    else if (100 <= div && div <= 999)
      cout << 4 << "\\n";
    else if (1000 <= div && div <= 9999)
      cout << 5 << "\\n";
    else if (10000 <= div && div <= 99999)
      cout << 6 << "\\n";
    else if (100000 <= div && div <= 200000)
      cout << 7 << "\\n";
  }

  return 0;
}


#include <cmath>
#include <iostream>
using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int a, b, c, ans;

  while (1) {
    cin >> a >> b;
    c = a + b;
    ans = (int)log10((double)c) + 1;
    cout << ans << "\\n";
  }
}

#include <cmath>
#include <iostream>
using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int a, b, c, ans;

  while (cin >> a >> b) {
    c = a + b;
    ans = (int)log10((double)c) + 1;
    cout << ans << "\\n";
  }
  return 0;
}


#include <cstdio>
int main() {
  for (;;) {
    int a, b, c;
    scanf("%d %d", &a, &b);
    if (a == EOF)
      break;
    c = a + b;
    int cnt, i;
    i = 1;
    for (cnt = 0;; cnt++) {
      if (c / i == 0)
        break;
      i = i * 10;
    }
    printf("%d\\n", cnt);
  }

  return 0;
}

#include <cstdio>
int main() {
  int a, b, c;
  while (scanf("%d", &a) != EOF) {
    scanf(" %d", &b);
    c = a + b;
    int cnt, i;
    i = 1;
    for (cnt = 0;; cnt++) {
      if (c / i == 0)
        break;
      i = i * 10;
    }
    printf("%d\\n", cnt);
  }

  return 0;
}


#include <cstdio>

using namespace std;

int main() {
  int a, b;

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

    printf("%d\\n", cnt);
  }

  return (0);
}

#include <iostream>

using namespace std;

int main() {
  int a, b;

  while (cin >> a >> b) {
    int cnt = 1;
    for (int i = a + b; i >= 10; cnt++)
      i /= 10;

    cout << cnt << endl;
  }

  return (0);
}


#include <iostream>
using namespace std;

int main() {
  int a, b, sum, res;

  while (cin >> a >> b) {
    res = 0;
    sum = a + b;

    while (sum / 10 != 0)
      res++;
    cout << res << endl;
  }
}

#include <iostream>
using namespace std;

int main() {
  int a, b, sum, res;

  while (cin >> a >> b) {
    res = 0;
    sum = a + b;

    while (sum / 10 != 0) {
      sum /= 10;
      res++;
    }
    cout << res + 1 << endl;
  }
}


#include <cstdio>

int main() {
  int a, b;
  while (scanf("%d%d", &a, &b)) {
    printf("%d\\n", a + b);
  }
  return 0;
}

#include <stdio.h>

int main() {
  int a, b, c;
  while (~scanf("%d%d", &a, &b)) {
    c = 0;
    a += b;
    while (a) {
      a /= 10;
      c++;
    }
    printf("%d\\n", c);
  }
  return 0;
}


#include <algorithm>
#include <iostream>
#include <list>
using namespace std;

int check_digit(int num) {
  int digit = 0;
  while (true) {
    num /= 10;
    digit++;
    if (num <= 0) {
      break;
    }
  }
  return digit;
}

int digit_count(int a, int b) {
  int digit;
  digit = check_digit(a + b);
  return digit;
}

int main(int argc, char const *argv[]) {
  int a, b;
  list<int> ls;
  while (!std::cin.eof()) {
    std::cin >> a;
    std::cin >> b;
    ls.push_back(digit_count(a, b));
  }

  for (int i : ls) {
    std::cout << i << '\\n';
  }
}

#include <algorithm>
#include <iostream>
#include <list>
using namespace std;

int check_digit(int num) {
  int digit = 0;
  while (true) {
    num /= 10;
    digit++;
    if (num <= 0) {
      break;
    }
  }
  return digit;
}

int digit_count(int a, int b) {
  int digit;
  digit = check_digit(a + b);
  return digit;
}

int main(int argc, char const *argv[]) {
  int a, b;
  list<int> ls;
  while (!(std::cin >> a >> b).eof()) {
    ls.push_back(digit_count(a, b));
  }

  list<int>::iterator it = ls.begin();
  while (it != ls.end()) {
    cout << *it << endl;
    it++;
  }
}


#include <stdio.h>

int main() {
  int a, b, sum;
  int count;

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

#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;
}


#include <iostream>
#include <stdio.h>
using namespace std;
int keta(int n) {
  static int cnt = 0;
  if (n > 0) {
    cnt++;
    return keta(n / 10);
  } else {
    return cnt;
  }
}
int main() {
  int a, b;
  int n;
  while (scanf("%d %d", &a, &b) != 1) {
    a += b;
    n = keta(a);
    cout << n << endl;
  }
  return 0;
}

#include <iostream>
#include <stdio.h>
using namespace std;
int cnt;
int keta(int n) {
  if (n > 0) {
    cnt++;
    return keta(n / 10);
  } else {
    return cnt;
  }
}
int main() {
  int a, b;
  int n;
  while (scanf("%d %d", &a, &b) != EOF) {
    cnt = 0;
    a += b;
    n = keta(a);
    cout << n << endl;
  }
  return 0;
}


#include <iostream>
using namespace std;

int keta(int i) {
  if (i < 10) {
    return 0;
  } else {
    return 1 + keta(i / 10);
  }
}

int main() {
  int a, b;
  while (1) {
    cin >> a >> b;
    cout << keta(a) + keta(b);
  }
}

#include <cmath>
#include <iostream>
using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    cout << (int)log10(a + b) + 1 << endl;
  }
}


#include <cstdio>

int main() {
  int a, b;
  char temp[100];

  while (scanf("%d %d", &a, &b) != 0) {
    printf("%d\\n", sprintf(temp, "%d", a + b));
  }

  return 0;
}

#include <cstdio>

int main() {
  int a, b;
  char temp[100];

  while (scanf("%d %d", &a, &b) != EOF) {
    printf("%d\\n", sprintf(temp, "%d", a + b));
  }

  return 0;
}


#include <iostream>
using namespace std;

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

  while (1) {
    cin >> a >> b;
    sum = a + b;

    for (int i = 1;; ++i) {
      if (sum < 10) {
        cout << i << endl;
        break;
      } else {
        sum /= 10;
      }
    }
  }

  return 0;
}

#include <iostream>
using namespace std;

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

  while (1) {
    cin >> a >> b;
    if (cin.eof()) {
      break;
    }

    sum = a + b;

    for (int i = 1;; ++i) {
      if (sum < 10) {
        cout << i << endl;
        break;
      } else {
        sum /= 10;
      }
    }
  }

  return 0;
}


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

int main() {

  // 変数の宣言

  int a, b, sum, i = 0;

  /////メイン処理/////

  while (cin >> a >> b) {
    // 入力
    sum = a + b;
    // 桁数の計算

    while (1) {
      if (pow(10, i) <= sum && pow(10, i + 1) > sum) {
        cout << i + 1 << endl;
        break;
      }
      i++;
    }
  }

  return 0;
}

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

int main() {

  // 変数の宣言

  int a, b, sum, i = 0;

  /////メイン処理/////

  while (cin >> a >> b) {
    // 入力
    sum = a + b;
    // 桁数の計算

    while (1) {
      if (pow(10, i) <= sum && pow(10, i + 1) > sum) {
        cout << i + 1 << endl;
        break;
      }
      i++;
    }

    i = 0;
  }

  return 0;
}


#include <iostream>
using namespace std;

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

#include <iostream>

using namespace std;

int main() {
  unsigned int a, b, c, ans = 0; // initializing numbers
  while (cin >> b >> c)          // entering 2 numbers
  {
    a = b + c; // adding the 2 numbers
    while (a != 0) {
      a /= 10;
      ans++; // dividing sum by 10 then adding ans by 1 for number of digits
    }
    cout << ans << endl; // print out how many digits
    ans = 0;
  }

  return 0;
}


#include <stdio.h>

int main() {
  int a = 0;
  int b = 0;
  int ans = 0;
  while (scanf("%d,%d", a, b) != EOF) {
    a += b;
    while (1) {
      a /= 10;
      ans++;
      if (a = 0) {
        printf("%d", ans);
        break;
      }
    }
  }
  return 0;
}

#include <iostream>

int main() {
  int count, a, b, tmp;

  while (std::cin >> a >> b) {
    count = 0;
    tmp = a + b;
    while (tmp > 0) {
      count++;
      tmp /= 10;
    }
    std::cout << count << std::endl;
  }
  return 0;
}


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

int main() {
  int a, b;
  while (scanf("%d %d", &a, &b)) {
    int sum = a + b, cnt = 1;
    while (sum /= 10)
      cnt++;
    cout << cnt << endl;
  }
}

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

int main() {
  int a, b;
  while (scanf("%d %d", &a, &b) != EOF) {
    int sum = a + b, cnt = 1;
    while (sum /= 10)
      cnt++;
    cout << cnt << endl;
  }
}


#include <iostream>
using namespace std;

int main() {
  int sum, j;
  int i = 0;
  int N;

  cout << "How many date sets (N<=200) N=";
  cin >> N;
  int a[N], b[N], dig[N];

  while (i < N) {
    cout << "please input `a b' : ";
    cin >> a[i] >> b[i];
    dig[i] = 1;
    if (0 <= a[i] && a[i] <= 1000000 && 0 <= b[i] && b[i] <= 1000000) {
      sum = a[i] + b[i];
      while (sum / 10 != 0) {
        sum = sum / 10;
        dig[i] += 1;
      }
      i++;
    } else {
      cout << "error!\\n";
    }
  }

  for (j = 0; j < i; j++) {
    cout << dig[j] << "\\n";
  }
}


#include <iostream>
using namespace std;

int getDigital(int sum) {
  int a = 1;
  while (sum / 10) {
    a++;
    sum /= 10;
  }
  return a;
}

int main() {
  int a, b, c;
  while (1) {
    cin >> a >> b;
    c = getDigital(a + b);
    cout << c << endl;
  }
}

#include <iostream>
using namespace std;

int getDigital(int sum) {
  int a = 1;
  while (sum / 10) {
    a++;
    sum /= 10;
  }
  return a;
}

int main() {
  int a, b, c;
  while (cin >> a >> b) {
    c = getDigital(a + b);
    cout << c << endl;
  }
}


#include <cmath>
#include <iostream>
using namespace std;

int main(void) {
  int a, b;
  int ans = 0;
  while (true) {
    cin >> a >> b;
    ans = log10(a + b) + 1;
    cout << ans << endl;
  }
  return 0;
}

#include <cmath>
#include <iostream>
using namespace std;

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


#include <cctype>
#include <cstdio>
using namespace std;

int main() {
  long long int a, b;
  int ans;
  while (true) {
    scanf("%lld %lld", &a, &b);
    if (a == 0 && b == 0)
      break;
    a += b;
    ans = 0;
    while (a > 0) {
      a = a / 10;
      ans++;
    }
    printf("%d\\n", ans);
  }
  return 0;
}

#include <cctype>
#include <cstdio>
using namespace std;

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


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

#include <iostream>
using namespace std;
int main() {
  int a, b;
  while (1) {
    cin >> a >> b;
    if (cin.eof())
      break;
    a += b;
    b = 0;
    while (a) {
      a /= 10;
      b++;
    }
    cout << b << endl;
  }
  return 0;
}


#include <cmath>
#include <iostream>
using namespace std;

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

  return 0;
}

#include <cmath>
#include <iostream>
using namespace std;

int main() {
  int a, b, i = 10;
  while (cin >> a >> b) {
    for (int j = 1;; j++) {
      if (a + b < (int)pow(10, j)) {
        cout << j << endl;
        break;
      }
    }
  }
  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int a, b;
  while (true) {
    cin >> a >> b;
    int sum = a + b;
    int ans = 0;
    while (sum > 0) {
      sum /= 10;
      ans++;
    }
    printf("%d\\n", ans);
  }
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;

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


#include <iostream>
using namespace std;

int main() {
  int a, b;
  while (true) {
    cin >> a >> b;
    cout << to_string(a + b).size() << endl;
  }
}

#include <iostream>
using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    cout << to_string(a + b).size() << endl;
  }
}


#include <iostream>
using namespace std;
int main() {
  int a, b, i, c = 0;
  while (1) {
    cin >> a >> b;
    a = a + b;
    for (i = 1; i < 10000000000; i *= 10) {
      if (a / i == 0)
        break;
      c++;
    }

    cout << c << endl;
  }
  return 0;
}

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


#include <iostream>

using namespace std;

int main() {

  while (1) {
    int a, b;
    cin >> a >> b;
    int count = 0;
    int result = a + b;
    while (1) {
      if (result == 0) {
        cout << count << "\\n";
        break;
      }
      result /= 10;
      count++;
    }
  }
  return 0;
}

#include <iostream>

using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    int count = 0;
    int result = a + b;
    while (1) {
      if (result == 0) {
        cout << count << "\\n";
        break;
      }
      result /= 10;
      count++;
    }
  }
  return 0;
}


#include <stdio.h>

using namespace std;

int main() {
  int a, b, i;
  while (a != -1 && b != -1) {
    scanf("%d%d", &a, &b);
    a += b;
    for (i = 0; i < 201; i++) {
      if (a / 10 == 0) {
        printf("%d\\n", i + 1);
        break;
      } else {
        a = a / 10;
      }
    }
  }

  return 0;
}

#include <stdio.h>

using namespace std;

int main() {
  int a, b, i;
  while (scanf("%d%d", &a, &b) != EOF) {
    a += b;
    for (i = 0; i < 201; i++) {
      if (a / 10 == 0) {
        printf("%d\\n", i + 1);
        break;
      } else {
        a = a / 10;
      }
    }
  }

  return 0;
}


#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int a, b;
  int cnt = 1;

  while (scanf(" %d %d", &a, &b)) {
    cnt = 1;
    int c = 10;
    for (int i = 1; i < 9; i++) {
      if ((a + b) - c <= 0)
        break;
      // cout << a << ' ' << b << '=' << a+b << endl;
      cnt++;
      c *= c;
    }
    cout << cnt << endl;
  }

  return 0;
}

#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int a, b;

  while (cin >> a >> b) {
    int cnt = 1;
    int c = 10;
    for (int i = 0; i < 8; i++) {
      // cout << c << ' ' << cnt << endl;
      if ((a + b) - c < 0)
        break;
      // cout << a << ' ' << b << '=' << a+b << endl;
      cnt++;
      c *= 10;
    }
    cout << cnt << endl;
  }

  return 0;
}


#include <iostream>
using namespace std;

int digit(int a, int b) {
  int sum = a + b;
  int d = 0;
  while (1) {
    sum /= 10;
    d++;
    if (sum == 0)
      break;
  }
  return d;
}

int main() {
  int a, b;
  while (1) {
    cin >> a >> b;
    cout << digit(a, b) << endl;
  }
  return 0;
}


#include <iostream>
using namespace std;

int main() {
  int A[200];
  int B[200];
  int i;
  for (i = 0; i < 200; i++) {
    A[i] = -1;
    B[i] = -1;
  }
  for (i = 0; i < 200; i++) {
    cin >> A[i] >> B[i];
  }
  i = 0;
  int sum, digit;
  while (A[i] >= 0) {
    sum = A[i] + B[i];
    while (digit) {
      sum /= 10;
      digit++;
    };
    cout << digit << endl;
  };
  return 0;
}

#include <iostream>
using namespace std;

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


#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;

int main() {

  while (true) {
    int a, b;
    cin >> a >> b;
    a = a + b;
    cout << (int)log10(a) + 1 << endl;
  }

  return 0;
}

#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <vector>
using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    a = a + b;
    cout << (int)log10(a) + 1 << endl;
  }

  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  while (true) {
    int a, b, c;
    char str[16];
    cin >> a >> b;

    c = sprintf(str, "%d", a + b);

    cout << c << endl;
  }
  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;

int main() {
  int a, b, c;
  char str[16];
  while (cin >> a >> b) {
    c = sprintf(str, "%d", a + b);
    cout << c << endl;
  }
  return 0;
}


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

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


#include <algorithm>
#include <iostream>
#include <vector>

#define ALL(a) a.begin(), a.end()

using namespace std;

int main() {
  unsigned a = 1, b;

  while (a) {
    cin >> a >> b;
    int c = 1, n = a + b;
    while (n /= 10)
      c++;
    if (n == 0)
      cout << 0 << endl;
    else
      cout << c << endl;
  }

  return 0;
}

#include <algorithm>
#include <iostream>
#include <vector>

#define ALL(a) a.begin(), a.end()

using namespace std;

int main() {
  unsigned a = 1, b;

  while (cin >> a >> b) {
    int c = 1, n = a + b;
    if (n == 0) {
      cout << 0 << endl;
      continue;
    }
    while (n /= 10)
      c++;
    cout << c << endl;
  }

  return 0;
}


#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

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

  while (true) {
    cin >> a >> b;
    sum = a + b;

    char str[10];
    int keta = sprintf(str, "%d", sum);

    cout << keta << endl;
  }
  return 0;
}

#include <iostream>
using namespace std;

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

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


#include <iostream>
using namespace std;

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

#include <iostream>
using namespace std;

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


#include <stdio.h>
int main(void) {
  int a, b, d = 1;
  while (1) {
    scanf("%d %d", &a, &b);
    for (size_t i = 10;; i *= 10) {
      if ((a + b) / i == 0)
        break;
      d++;
    }
    printf("%d\\n", d);
    a = 0;
    b = 0;
    d = 1;
  }
  return 0;
}

#include <stdio.h>
int main(void) {
  int a, b, d = 1;
  while (scanf("%d %d", &a, &b) != EOF) {
    for (size_t i = 10;; i *= 10) {
      if ((a + b) / i == 0)
        break;
      d++;
    }
    printf("%d\\n", d);
    a = 0;
    b = 0;
    d = 1;
  }
  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;

int main(void) {
  int i;
  int x, y;

  for (;;) {
    scanf("%d %d", &x, &y);
    x += y;
    for (i = 1;; i++) {
      x /= 10;
      if (x == 0) {
        break;
      }
    }
    printf("%d\\n", i);
  }

  return 0;
}

#include <cstdio>
#include <iostream>
using namespace std;

int main(void) {
  int i;
  int x, y;

  for (;;) {
    if (scanf("%d %d", &x, &y) == EOF) {
      break;
    }
    x += y;
    for (i = 1;; i++) {
      x /= 10;
      if (x == 0) {
        break;
      }
    }
    printf("%d\\n", i);
  }

  return 0;
}


#include <iostream>
using namespace std;

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

  return 0;
}

#include <iostream>
using namespace std;

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


#include <stdio.h>
int main() {
  int a, b, c, i, count;
  while (scanf("%d%d", &a, &b)) {
    count = 1;
    if (a >= 0 && b >= 0) {
      c = a + b;
      for (i = 10; i <= c; i *= 10) {
        count++;
      }
      printf("%d\\n", count);
    }
  }
  return 0;
}

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


#include <algorithm>
#include <cstdio>
#include <functional>
#include <vector>
using namespace std;

int main() {
  std::vector<int> r;
  while (true) {
    int nums[2];
    for (int i = 0; i < 2; ++i) {
      scanf("%d", &nums[i]);
    }

    r.push_back(nums[0] + nums[1]);
  }

  for (int &i : r) {
    printf("%d\\n", i);
  }

  return 0;
}

#include <algorithm>
#include <cstdio>
#include <functional>
#include <vector>

#include <cstdlib>
#include <iostream>
#include <string>
#include <typeinfo>
using namespace std;

int GetDigit(int num);

int main() {
  std::vector<int> r;
  while (true) {
    int nums[2];

    string str;
    int a = 0;
    getline(cin, str);
    string n[2];
    int nn[2];
    for (int i = 0; i < str.size(); ++i) {
      if (str[i] == ' ')
        a++;
      n[a] += str[i];
    }
    if (n[1].size() == 0)
      break;
    nn[0] = std::stoi(n[0]);
    nn[1] = std::stoi(n[1]);

    r.push_back(nn[0] + nn[1]);
  }

  for (int i = 0; i < r.size(); ++i) {
    printf("%d\\n", GetDigit(r[i]));
  }

  return 0;
}

int GetDigit(int num) {
  int digit = 0;
  while (num != 0) {
    num /= 10;
    ++digit;
  }
  return digit;
}


#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
  int num1, num2;
  char str[10];
  int i;

  while (1) {

    // 値の入力
    cin >> num1 >> num2;

    // 整形
    sprintf(str, "%d\\0", (num1 + num2));

    // 文字数計測
    for (i = 0; str[i] != '\\0'; i++) {
    }

    // 文字数表示
    cout << i << endl;
  }

  return 0;
}

#include <iostream>
#include <stdio.h>

#define MAX_NUMBER 200

using namespace std;

int main() {
  int num1, num2;
  char str[10];
  int i;

  while (cin >> num1 >> num2) {
    // 整形
    sprintf(str, "%d\\0", (num1 + num2));

    // 文字数計測
    for (i = 0; str[i] != '\\0'; i++) {
    }

    // 文字数表示
    cout << i << endl;
  }

  return 0;
}


#include <iostream>
using namespace std;
int main() {
  int a, b, i, s, ten = 1;
  while (1) {
    cin >> a >> b;
    if (a == 0 && b == 0)
      break;
    s = a + b;
    for (i = 1; i < 8; i++) {
      ten = ten * 10;
      if (s / ten == 0) {
        cout << i << endl;
        break;
      }
    }
    ten = 1;
  }
  return 0;
}

#include <iostream>
using namespace std;
int main() {
  int a, b, i, s, ten = 1;
  while (cin >> a >> b) {
    s = a + b;
    for (i = 1; i < 8; i++) {
      ten = ten * 10;
      if (s / ten == 0) {
        cout << i << endl;
        break;
      }
    }
    ten = 1;
  }

  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  while (true) {
  }
  int n = a + b;
  if (n > 99999) {
    cout << 6 << endl;
  } else if (n > 9999) {
    cout << 5 << endl;
  } else if (n > 999) {
    cout << 4 << endl;
  } else if (n > 99) {
    cout << 3 << endl;
  } else if (n > 9) {
    cout << 2 << endl;
  } else {
    cout << 1 << endl;
  }
}

#include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  while (cin >> a >> b) {
    int n = a + b;
    if (n > 999999) {
      cout << 7 << endl;
    } else if (n > 99999) {
      cout << 6 << endl;
    } else if (n > 9999) {
      cout << 5 << endl;
    } else if (n > 999) {
      cout << 4 << endl;
    } else if (n > 99) {
      cout << 3 << endl;
    } else if (n > 9) {
      cout << 2 << endl;
    } else {
      cout << 1 << endl;
    }
  }
}


#include <bits/stdc++.h>
#define INT(name)                                                              \\
  int name;                                                                    \\
  scanf("%d", &name);
#define VINT(name, n)                                                          \\
  vector<int> name(n);                                                         \\
  for (int i = 0; i < n; i++)                                                  \\
    scanf("%d", &name[i]);

using namespace std;

int main(int argc, char const *argv[]) {
  int a, b;
  vector<int> answer;
  while (1) {
    cin >> a >> b;
    printf("%d\\n", (int)log10(a + b) + 1);
    if (cin.bad())
      break;
  }
}

#include <bits/stdc++.h>
#define INT(name)                                                              \\
  int name;                                                                    \\
  scanf("%d", &name);
#define VINT(name, n)                                                          \\
  vector<int> name(n);                                                         \\
  for (int i = 0; i < n; i++)                                                  \\
    scanf("%d", &name[i]);

using namespace std;

int main(int argc, char const *argv[]) {
  int a, b;
  vector<int> answer;
  while (cin >> a >> b) {
    printf("%d\\n", (int)log10(a + b) + 1);
  }
}


#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main(void) {
  long long n, i, j, k;
  while (1) {
    cin >> j >> k;
    int x = j + k;
    stringstream str;
    str << x;
    string st = str.str();
    cout << st.size() << endl;
  }
}

#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
  int x, y;
  while (cin >> x >> y) {
    x = x + y;
    stringstream a;
    a << x;
    string str = a.str();
    y = str.size();
    cout << y << endl;
  }
}


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

  long a, b;

  while (1) {
    cin >> a >> b;

    long c = a + b;
    long d = 1;
    long e = 10;
    for (int j = 0; j < 10; j++) {
      if (c == 0) {
        cout << 1 << endl;
      } else if (c >= d && c < e) {
        cout << j + 1 << endl;
      }
      d = d * 10;
      e = e * 10;
    }
  }
  return 0;
}

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

  long a, b;

  while (cin >> a >> b) {
    long c = a + b;
    long d = 1;
    long e = 10;
    for (int j = 0; j < 10; j++) {
      if (c == 0) {
        cout << 1 << endl;
      } else if (c >= d && c < e) {
        cout << j + 1 << endl;
      }
      d = d * 10;
      e = e * 10;
    }
  }
  return 0;
}


#include <stdio.h>

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

  return 0;
}

#include <stdio.h>

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

  return 0;
}


#include <cmath>
#include <iostream>
using namespace std;
int main() {
  int a, b;
  while (1) {
    cin >> a >> b;
    a += b;
    a = (int)log10((double)a) + 1;

    cout << a << endl;
  }
  return 0;
}

#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  int a, b;
  while (cin >> a >> b) {
    a += b;
    a = (int)log10((double)a) + 1;

    cout << a << endl;
  }
  return 0;
}


#include <iostream>

using namespace std;

int main() {
  int a, b, sum, count;

  while (cin >> a >> b) {

    sum = a + b;
    count = 0;

    for (int i = sum; i >= 1; i / 10) {
      count++;
    }

    cout << count << endl;
  }

  return 0;
}

#include <iostream>

using namespace std;

int main() {
  int a, b, sum, count;

  while (cin >> a >> b) {

    sum = a + b;
    count = 0;

    for (int i = sum; i >= 1; i = i / 10) {
      count++;
    }

    cout << count << endl;
  }

  return 0;
}


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

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


#include <iostream>
using namespace std;

int main() {
  int a, b, sum, digit = 0;
  try {
    while (1) {
      digit = 0;
      cin >> a >> b;
      sum = a + b;
      while (sum > 0) {
        sum /= 10;
        digit++;
      }
      cout << digit;
    }
  } catch (...) {
    return 0;
  }
}

#include <iostream>
using namespace std;

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


#include <iostream>
using namespace std;

int main() {
  while (true) {
    int a, b;

    if (!cin >> a >> b)
      break;
    int c = a + b;
    int i;
    for (i = 1; c != 0; i++) {
      c /= 10;
    }
    cout << i << endl;
  }
  return 0;
}

#include <iostream>
using namespace std;

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


#include <iostream>

using namespace std;

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

int main() {
  solve();
  return (0);
}

#include <iostream>

using namespace std;

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

int main() {
  solve();
  return (0);
}


#include <iostream>
#include <string>

using namespace std;

int main() {
  for (;;) {
    int a, b, i;

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

    if (a == EOF || b == EOF) {
      break;
    }

    a += b;

    for (i = 1;; i++) {
      if (a < 10) {
        break;
      }
      a = a / 10;
    }

    cout << i << endl;
  }
}

#include <iostream>
#include <string>

using namespace std;

int main() {
  int a, b, i;
  while (cin >> a >> b) {
    a += b;

    for (i = 1;; i++) {
      if (a < 10) {
        break;
      }
      a = a / 10;
    }

    cout << i << endl;
  }
}


#include <iostream>
using namespace std;

int main() {
  while (1) {
    int i, a, b, c;
    cin >> a >> b;
    c = a + b;
    for (i = 0; c != 0; i++) {
      c /= 10;
    }
    if (i == 0)
      i = 1;
    cout << i << "\\n";
  }

  return 0;
}

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main() {
  int i, a, b, c;
  while (cin >> a >> b) {
    c = a + b;
    for (i = 1; c >= 10; i++) {
      c /= 10;
    }
    printf("%d\\n", i);
  }
  return 0;
}


#include <cstdio>
int main() {
  int d, n, a, b;
  while (true) {
    d = 0;
    if (scanf("%d %d", &a, &b) == 0)
      break;
    n = a + b;
    while (n > 0) {
      d++, n /= 10;
    };
    printf("%d\\n", d);
  };
  return 0;
};

#include <cstdio>
int main() {
  int d, n, a, b;
  while (true) {
    d = 0;
    if (scanf("%d %d", &a, &b) == EOF)
      break;
    n = a + b;
    while (n > 0) {
      d++, n /= 10;
    };
    printf("%d\\n", d);
  };
  return 0;
};


#include <iostream>
using namespace std;
int main() {
  int a, b, i = 0;
  while (cin >> a >> b, a + b != 0) {
    if (i == 199)
      break;
    int num = 1;
    int c = a + b;
    while (c / 10 != 0) {
      num++;
      c /= 10;
    }
    cout << num << endl;
  }
  return 0;
}

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


#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;

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

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = {-2};

void input() {
  int i = 0;

  while (CI data_[i][0] >> data_[i][1]) {
    i++;
  }

  return;
}

int main(void) {
  input();
  int i = 0;
  int sum = 0;
  int numb = 0;

  while (true) {
    sum = data_[i][0] + data_[i][1];
    while (sum != 0) {
      numb++;
      sum /= 10;
    }
    if (data_[i + 1][0] == -2) {
      break;
    }
  }

  CO numb E

      return 0;
}

#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <math.h>
#include <queue>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>

#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;

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

int A = 0, B = 0, K = 0, T = 0, W = 0, N = 0, H = 0;
int n = 0;
double L = 0;
double S = 0;
double ar = 0, br = 0, cr = 0;
int answer = 0;

string C;
string sA, strB;
vector<vector<char>> map;
vector<double> num;
vector<string> str;

int sum = 0;

vector<int> value;
vector<int> weight;

int dp[110][10010];

int data_[210][2] = {-2};

void input() {
  int i = 0;

  return;
}

int main(void) {
  input();
  int i = 0;
  int sum = 0;
  int numb = 0;
  int a = 0;
  int b = 0;

  while ((scanf("%d%d", &a, &b)) != EOF) {
    sum = a + b;
    while (sum != 0) {
      numb++;
      sum /= 10;
    }
    CO numb E numb = 0;
  }

  return 0;
}


#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  char a, b;
  while (a = getchar() && a != EOF) {
    cin >> b;
    int sum = 0, c = a + b - 96;
    while (c != 0) {
      c = c / 10;
      sum++;
    }
    cout << sum << endl;
  }
  return 0;
}

#include <cstdio>
int main() {
  int n, n1, n2, count, a;
  while (scanf("%d%d", &n1, &n2) != EOF) {
    count = 0;
    a = n1 + n2;
    while (a != 0) {
      a = a / 10;
      count++;
    }
    printf("%d\\n", count);
  }
  return 0;
}


#include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int c, g, a, b;
  while (1) {
    c = 0;
    cin >> a >> b;
    if (a == EOF && b == EOF)
      break;
    g = a + b;
    while (1) {
      if (g / 10 >= 1)
        c++;
      else
        break;
      g /= 10;
    }
    cout << c + 1 << endl;
  }
  return 0;
}

#include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int c, g, a, b;
  while (scanf("%d%d", &a, &b) != EOF) {
    c = 0;
    g = a + b;
    while (1) {
      if (g / 10 >= 1)
        c++;
      else
        break;
      g /= 10;
    }
    cout << c + 1 << endl;
  }
  return 0;
}


#include <iostream>

using namespace std;

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

  cin >> a >> b;
  int ar[7] = {1, 2, 3, 4, 5, 6, 7};
  while (a != -1) {
    int counter = -1;
    x = a + b;
    while (x != 0) {
      x /= 10;
      counter++;
    }
    cout << ar[counter] << endl;
    cin >> a >> b;
  }
}

#include <algorithm>
#include <cstdio>
#define ele long
using namespace std;
ele a, b;
inline ele d(ele x) {
  if (x == 0)
    return 1;
  ele s = 0;
  while (x > 0) {
    ++s;
    x /= 10;
  }
  return s;
}
int main() {
  while (~scanf("%d%d", &a, &b))
    printf("%d\\n", d(a + b));
  return 0;
}


#include <iostream>

using namespace std;

long n(int k) {
  if (k < 10 && k > 0)
    return 1;
  if (k >= 10 && k <= 99)
    return 2;
  if (k >= 100 && k <= 999)
    return 3;
  if (k >= 1000 && k <= 9999)
    return 4;
  if (k >= 10000 && k <= 99999)
    return 5;
  if (k >= 100000 && k <= 999999)
    return 6;

  return n(k);
}

int main() {

  int i, j, k;

  cin >> i;
  cin >> j;
  k = i + j;

  cout << n(i);
  return 0;
}

#include <math.h>
#include <stdio.h>
int array[100];
int counter(long long int a, long long int b);
int main() {
  long long int a, b;
  int count;
  while (scanf("%lld %lld", &a, &b) == 2) {
    count = counter(a, b);
    printf("%d\\n", count);
  }
  return (0);
}
int counter(long long int a, long long int b) {
  long long int number;
  int x, count = 0;
  number = a + b;
  if (number == 0) {
    count = 1;
    return (count);
  } else {

    while (number != 0) {
      count++;
      number = number / 10;
    }
    return (count);
  }
}


#include <assert.h>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iostream>

using namespace std;

#define set 200;
int main() {

  int a, b, sum;
  ifstream fin;

  fin.open("datasets.txt", ios::in);
  assert(!fin.fail());
  if (a >= 0 || b <= 1000000) {
    fin >> a >> b;
    while (!fin.eof()) {
      fin >> a >> b;
      cout << a << "\\t" << b << endl;
      cout << ceil(log10(a + b)) << endl;
    }

    fin.close();
  }
  return 0;
}

#include <stdio.h>
int main() {
  int a, b, dig, sum;
  while (scanf("%d %d", &a, &b) != EOF) {
    dig = 0;
    sum = a + b;
    while (sum) {
      dig++;
      sum = sum / 10;
    }
    printf("%d\\n", dig);
  }
  return 0;
}

6adaee1f-a29f-4882-b325-35332810688a.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00002/C++/s445017591.cpp:19: int main(): Assertion `!fin.fail( )' failed.


#include <iostream>
using namespace std;

int main() {
  int a, b, sum, digit;
  while (1) {
    cin >> a >> b;
    sum = a + b;
    digit = 0;
    while (sum != 0) {
      sum /= 10;
      digit++;
    }
    cout << digit << "\\n";
  }
}

#include <cstdio>
#include <iostream>
using namespace std;
int main() {
  int a, b, n, i, count;
  while (2 == scanf("%d %d", &a, &b)) {
    n = a + b;
    count = 0;
    while (n != 0) {
      i = n % 10;
      n /= 10;
      count++;
    }
    cout << count << endl;
  }
  return 0;
}


#include <iostream>
using namespace std;

int main() {

  int a, b;
  int temp;
  int i = 0;
  int j = 0;
  int n[200];

  while (cin >> a, b) {
    n[i] = 0;
    temp = a + b;
    while (temp != 0) {
      n[i]++;
      temp = temp / 10;
    }
    if (i == 199) {
      break;
    }
    i++;
  }

  while (cout << n[j]) {
    j++;
  }

  return 0;
}

#include <iostream>
using namespace std;

int main() {

  int a, b;
  int temp;
  int i = 0;
  int n;

  while (cin >> a >> b) {
    n = 0;
    temp = a + b;
    while (temp != 0) {
      n++;
      temp = temp / 10;
    }
    cout << n << "\\n";
    i++;
  }

  return 0;
}


#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;

#define FOR(i, s, e) for (int i = int(s); i != int(e); i++)
#define REP(i, e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int main(int argc, char const *argv[]) {

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

#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;

#define FOR(i, s, e) for (int i = int(s); i != int(e); i++)
#define REP(i, e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int main(int argc, char const *argv[]) {

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


#include <algorithm>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;

int main(void) {

  int a, b, sum = 0, count;

  for (;;) { //??°????????????????????°?????????
    count = 0;
    cin >> a >> b;
    sum = a + b;
    if (a == NULL || !a)
      break;

    do {
      sum /= 10;
      count++;

    } while (sum / 10 != 0);
    //?????°???count?????°
    cout << count + 1 << endl;
  }
  return 0;
}

#include <algorithm>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;

int main(void) {

  int a, b, sum = 0, count;

  for (; cin >> a >> b;) { //??°????????????????????°?????????
    count = 0;
    sum = a + b;
    if (sum == 0) {
      cout << 0 << endl;
    } else if (sum != 0) {

      while (sum > 9) {

        sum /= 10;
        count++;
      }
      //?????°???count?????°
      cout << count + 1 << endl;
    }
  }

  return 0;
}


#include <iostream>
#include <string>

using namespace std;

int main() {

  int a, b;
  string input;
  int size[3];
  int i = 0;
  int count = 0;
  // cout << "input two numbers" << endl;
  for (i = 0; i < 200; i++) {
    cin >> a >> b;
    b += a;
    input = to_string(b);
    size[i] = input.size();
    count++;
  }
  for (i = 0; i < count; i++) {
    cout << size[i] << endl;
  }
}

#include <iostream>
#include <string>

using namespace std;

int main() {

  int a, b;
  string input;
  int size = 0;
  int count = 0;

  while (cin >> a >> b) {
    b += a;
    input = to_string(b);
    size = input.size();
    cout << size << endl;
    count++;
    if (count == 199) {
      break;
    }
  }
}


#include <iostream>

using namespace std;

int getDigitNumber(int n) { return n > 0 ? 1 + getDigitNumber(n / 10) : 0; }

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

#include <iostream>

using namespace std;

int getDigitNumber(int n) { return n > 0 ? 1 + getDigitNumber(n / 10) : 0; }

int main(int argc, char const *argv[]) {
  while (true) {
    int a, b;
    cin >> a >> b;
    if (cin.eof()) {
      break;
    }
    cout << getDigitNumber(a + b) << endl;
  }
  return 0;
}