#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#define ll long long
using namespace std;

ll n;
struct node{
	ll sum,value;
}first[100010],second[100010];

inline ll read(){
    ll x=0,tmp=1;
    char ch=getchar();
    while(!isdigit(ch)){
        if(ch=='-') tmp=-1;
        ch=getchar();
    }
    while(isdigit(ch)){
        x=(x<<3)+(x<<1)+ch-48;
        ch=getchar();
    }
    return tmp*x;
}

inline bool cmp(node a,node &b){
    return a.sum>b.sum;
}
 
int main(){
	n=read();
	for(ll i=1; i<=n; i++){
        ll x=read();
		if(i&1){
            first[x].sum++;
            first[x].value=x;
        }
		else{
            second[x].sum++;
            second[x].value=x;
        }
	}
	
	sort(first+1,first+100001,cmp);
	sort(second+1,second+100001,cmp);
	if(first[1].value!=second[1].value) printf("%lld\n",n-first[1].sum-second[1].sum); 
	else printf("%lld\n", n-max(first[1].sum+second[2].sum,first[2].sum+second[1].sum));
	
	return 0;
}