#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
Volume0-0001
=end
class Main

  def initialize
    fh=STDIN
    while fh.gets do
      a,b = $_.split.map{|x| x.to_i}
      puts (a+b).to_s.length
    end
  end

end


if $0 == __FILE__ then
  Main.new
end