import string

n = int(eval(input()))

a = eval(input())

b = eval(input())

c = eval(input())

cnt = 0

for x, y, z in zip(a, b, c):

    wl = [0]*26

    wl[string.ascii_lowercase.index(x)] += 1

    wl[string.ascii_lowercase.index(y)] += 1

    wl[string.ascii_lowercase.index(z)] += 1

    cnt += 3 - max(wl)

print(cnt)
n = int(eval(input()))

a = list(eval(input()))

b = list(eval(input()))

c = list(eval(input()))



ans = 0

for x, y, z in zip(a, b, c):

    ans += len(set((x, y, z))) - 1

print(ans)
import string

n = int(eval(input()))
a = eval(input())
b = eval(input())
c = eval(input())
cnt = 0
for x, y, z in zip(a, b, c):
    wl = [0] * 26
    wl[string.ascii_lowercase.index(x)] += 1
    wl[string.ascii_lowercase.index(y)] += 1
    wl[string.ascii_lowercase.index(z)] += 1
    cnt += 3 - max(wl)
print(cnt)

n = int(eval(input()))
a = list(eval(input()))
b = list(eval(input()))
c = list(eval(input()))
ans = 0
for x, y, z in zip(a, b, c):
    ans += len(set((x, y, z))) - 1
print(ans)

-import string - -a = eval(input()) -b = eval(input()) -c = eval(input()) -cnt = 0 +a = list(eval(input())) +b = list(eval(input())) +c = list(eval(input())) +ans = 0 -    wl = [0] * 26 -    wl[string.ascii_lowercase.index(x)] += 1 -    wl[string.ascii_lowercase.index(y)] += 1 -    wl[string.ascii_lowercase.index(z)] += 1 -    cnt += 3 - max(wl) -print(cnt) +    ans += len(set((x, y, z))) - 1 +print(ans)