import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

  public static void main( String[] args ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main( String[] args ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  }
} Main public static void main( String[] args ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String n = br.readLine(); n br.readLine() br.readLine br while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    } n != null n null {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    } String[] sp = n.split(" "); sp n.split(" ") n.split n " " int result = 0; result 0 for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      } String str sp {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      } {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      } try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        } catch (NumberFormatException ex) {
          result = 0;
        } NumberFormatException ex {
          result = 0;
        } result = 0 result 0 {
          result += Integer.parseInt(str);
        } result += Integer.parseInt(str) result Integer.parseInt(str) Integer.parseInt Integer str if (result == 0) {
        break;
      } result == 0 result 0 {
        break;
      } break; System.out.println(String.valueOf(result).length()) System.out.println System.out System System.out String.valueOf(result).length() String.valueOf(result).length String.valueOf(result) String.valueOf String result n = br.readLine() n br.readLine() br.readLine br String[] args args public class Main {

  public static void main( String[] args ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  }
} public class Main {

  public static void main( String[] args ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

  public static void main( String[] args ) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String n = br.readLine();
    while (n != null) {
      String[] sp = n.split(" ");
      int result = 0;
      for (String str : sp) {
        try {
          result += Integer.parseInt(str);
        } catch (NumberFormatException ex) {
          result = 0;
        }
      }
      if (result == 0) {
        break;
      }
      System.out.println(String.valueOf(result).length());
      n = br.readLine();
    }
  }
}