program main
   implicit none
   integer n,i,counter
   character(100) ::a,b,c
   read(*,*)n
      read(*,*)a
   read(*,*)b
   read(*,*)c
   counter=0
   do i=1,n
      if(a(i:i)==b(i:i).and.c(i:i)==b(i:i))then
         counter=counter
      elseif(a(i:i)/=b(i:i) .and. c(i:i)/=b(i:i) .and. c(i:i)/=a(i:i))then
         counter=counter+2
      else
         counter=counter+1
      endif
   enddo
   write(*,*)counter
end program main
