module.exports=function(e){var r={};function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)n.d(t,o,function(r){return e[r]}.bind(null,o));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=0)}([function(e,r,n){n(1)(n(2).readFileSync("/dev/stdin","UTF-8"))},function(e,r){e.exports=function(e){for(var r=e.split("\n"),n=Number(r[0]),t=r[1].split(" ").map(function(e){return Number(e)}),o={},u={},i=0,c=0,f=0;f<n;f++)f%2==0?(o[t[f]]||(o[t[f]]=0),o[t[f]]+=1,i+=1):(u[t[f]]||(u[t[f]]=0),u[t[f]]+=1,c+=1);var a=[],l=0,s=0,d=i+c,p=i+c;for(var b in o){var v={num:Number(b),count:o[b],isOdd:!0};a.push(v),l+=1}for(var m in 1==l&&(d=o[Object.keys(o)[0]]),u){var y={num:Number(m),count:u[m],isOdd:!1};a.push(y),s+=1}1==s&&(p=u[Object.keys(u)[0]]),a.sort(function(e,r){return r.count-e.count});for(var O,j,g=i+c,x=0;x<a.length;x++){var S=a[x];if(S.isOdd?O=S:j=S,O&&j&&O.num!=j.num){g=i-O.count+(c-j.count);break}}var _=Math.min(g,d,p);console.log(_)}},function(e,r){e.exports=require("fs")}]);