program Touitsh
    implicit none
    integer(4):: n,i,ans
    character(:),allocatable:: a,b,c
    logical:: b1,b2,b3

    read*, n
    allocate(character(n):: a,b,c)
    read*, a
    read*, b
    read*, c

    ans=0
    do i=1,n
        b1 = a(i:i) == b(i:i)
        b2 = b(i:i) == c(i:i)
        b3 = a(i:i) == c(i:i)

        if (b1 .and. b2 .and. b3) then
            cycle
        else if (.not. (b1 .or. b2 .or. b3)) then
            ans=ans+2
        else
            ans=ans+1
        end if
    end do

    print*, ans
end program Touitsh