open System

[<EntryPoint>]
let main argv =
    let s = stdin.ReadLine() |> Seq.toList
    let t = stdin.ReadLine() |> Seq.toList
    let l = s.Length
    let rec f i v =
        if i = l then v
        else
            if s.[i] = t.[i] then f (i+1) v
            else f (i+1) (v+1)
    f 0 0 |> stdout.WriteLine
    0