defmodule Main do
  def main do
    s=IO.gets("") |> String.trim()
    t=IO.gets("") |> String.trim()
    IO.puts(check(s,t))
    end

    def check(s,t) do
      if s=="" do
        0
      else
        {sh, st}=String.split_at(s,1)
        {th, tt}=String.split_at(t,1)
        if sh==th do
          check(st,tt)
        else
          check(st,tt)+1
        end
      end
    end
end
