let read_lines () =
  let rec iter xs =
    try read_line() :: xs |> iter
    with End_of_file -> xs
  in iter [] |> List.rev

let split_ints str =
  Str.split (Str.regexp " ") str
  |> List.map int_of_string

let println_int i =
  print_int i;
  print_newline ()

let rec digit_length n =
  if n >= 10 then
    1 + digit_length (n / 10)
  else 1
                
let () = read_lines()
         |> List.map split_ints
         |> List.map (List.fold_left (+) 0)
         |> List.map digit_length
         |> List.iter println_int