program main
    use iso_fortran_env
    implicit none
    character(200000) :: tmp
    character(:), allocatable :: s, t
    character(1), allocatable :: a(:)
    integer(int32), allocatable :: b(:)

    read *, tmp
    s = trim(tmp)
    read *, tmp
    t = trim(tmp)
    allocate(b(len_trim(t)), source = 1)

    print *, len_trim(t) - sum(pack(b, (transfer(s, a) == transfer(t, a))))

end program main