
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  }

} 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 reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  }

} Main public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  } main {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String readStr; readStr while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    } (readStr = reader.readLine()) != null (readStr = reader.readLine()) readStr reader.readLine() reader.readLine reader null {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    } String[] formattedStrs = readStr.split(" "); formattedStrs readStr.split(" ") readStr.split readStr " " int left = Integer.parseInt(formattedStrs[0]); left Integer.parseInt(formattedStrs[0]) Integer.parseInt Integer formattedStrs[0] formattedStrs 0 int right = Integer.parseInt(formattedStrs[1]); right Integer.parseInt(formattedStrs[1]) Integer.parseInt Integer formattedStrs[1] formattedStrs 1 int weight = 1; weight 1 int count = 1; count 1 while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      } true {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      } int surplus = (left + right) / weight; surplus (left + right) / weight (left + right) left right weight if (surplus < 10) {
          System.out.println(count);
          break;
        } surplus < 10 surplus 10 {
          System.out.println(count);
          break;
        } System.out.println(count) System.out.println System.out System System.out count break; weight *= 10 weight 10 count++ count String[] args args public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  }

} public class Main {

  public static void main(String[] args) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  }

} 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 reader = new BufferedReader(new InputStreamReader(System.in));

    String readStr;
    while ((readStr = reader.readLine()) != null) {
      String[] formattedStrs = readStr.split(" ");
      int left = Integer.parseInt(formattedStrs[0]);
      int right = Integer.parseInt(formattedStrs[1]);

      int weight = 1;
      int count = 1;
      while (true) {
        int surplus = (left + right) / weight;
        if (surplus < 10) {
          System.out.println(count);
          break;
        }
        weight *= 10;
        count++;
      }

    }
  }

}