N = gets.to_i
A, B, C = 3.times.map { gets.chomp.chars }

a = A.zip(B.zip(C)).map do |a, (b, c)|
  if a == b && b == c
    0
  elsif a == b || b == c || c == a
    1
  else
    2
  end
end

p a.inject(:+)
