local n = io.read("*n", "*l") local s = io.read() local t = io.read() local f = 0 for i = 1, n do if s:sub(i, i) == "1" then f = f + 1 end if t:sub(i, i) == "1" then f = f + 1 end end if f % 2 == 1 then s = s:reverse() end local c = 0 for i = 1, n do if s:sub(i, i) ~= t:sub(i, i) then c = c + 1 end end print(c)