#include <algorithm> //STLÍ¨ÓÃËã·¨
#include <cmath> //¶¨ÒåÊýÑ§º¯Êý
#include <cstdio> //¶¨ÒåÊäÈë/Êä³öº¯Êý
#include <iostream> //Êý¾ÝÁ÷ÊäÈë/Êä³ö
#include <cstring> //×Ö·û´®´¦Àí
#include <string> //×Ö·û´®Àà
#include <ctime> //¶¨Òå¹ØÓÚÊ±¼äµÄº¯Êý
#define itn int
#define fro for
#define ll long long
#define reg register
#define inf 1234567890
#define rep(i,a,b,c) for (int i=a;i<=b;i+=c)
/*#include <bitset> //STLÎ»¼¯ÈÝÆ÷
#include <cstype> //×Ö·û´¦Àí
#include <cerrno> //¶¨Òå´íÎóÂë
#include <complex> //¸´ÊýÀà
#include <clocale> //¶¨Òå±¾µØ»¯º¯Êý
#include <cstdlib> //¶¨ÒåÔÓÏîº¯Êý¼°ÄÚ´æ·ÖÅäº¯Êý
#include <deque> //STLË«¶Ë¶ÓÁÐÈÝÆ÷
#include <exception> //Òì³£´¦ÀíÀà
#include <fstream> //ÎÄ¼þÊäÈë/Êä³ö
#include <functional> //STL¶¨ÒåÔËËãº¯Êý(´úÌæÔËËã·û)
#include <limits> //¶¨Òå¸÷ÖÖÊý¾ÝÀàÐÍ×îÖµ³£Á¿
#include <list> //STLÏßÐÔÁÐ±íÈÝÆ÷
#include <map> //STLÓ³ÉäÈÝÆ÷
#include <iomanip> //²ÎÊý»¯ÊäÈë/Êä³ö
#include <ios> //»ù±¾ÊäÈë/Êä³öÖ§³Ö
#include <iosfwd> //ÊäÈë/Êä³öÏµÍ³Ê¹ÓÃµÄÇ°ÖÃÉùÃ÷
#include <istream> //»ù±¾ÊäÈëÁ÷
#include <ostream> //»ù±¾Êä³öÁ÷
#include <queue> //STL¶ÓÁÐÈÝÆ÷
#include <set> //STL¼¯ºÏÈÝÆ÷
#include <sstream> //»ùÓÚ×Ö·û´®µÄÁ÷
#include <stack> //STL¶ÑÕ»ÈÝÆ÷
#include <stdexcept> //±ê×¼Òì³£Àà
#include <streambuf> //µ×²ãÊäÈë/Êä³öÖ§³Ö
#include <utility> //STLÍ¨ÓÃÄ£°åÀà
#include <vector> //STL¶¯Ì¬Êý×éÈÝÆ÷
#include <cwchar.h>//¿í×Ö·û´¦Àí¼°ÊäÈë/Êä³ö
#include <cwctype.h> //¿í×Ö·û·ÖÀà*/

using namespace std;

int ans;

int max(int x,int y){return x>y?x:y;}

int min(int x,int y){return x<y?x:y;}

int abs(int x){return x>0?x:-x;}

int gcd(int x,int y){return (!y)?x:gcd(y,x%y);}

void exgcd(int a,int b,int &d,int &x,int &y){if (!b){d=a,x=1,y=0;}else{exgcd(b,a%b,d,y,x);y-=x*(a/b);}}

int quick_power(ll a,int b){ll r=1;for (;b;b>>=1,a=a*a)if (b&1) r=r*a;return r;}

inline char read() {
	static const int IN_LEN = 1000000;
	static char buf[IN_LEN], *s, *t;
	return (s == t ? t = (s = buf) + fread(buf, 1, IN_LEN, stdin), (s == t ? -1 : *s++) : *s++);
}
template<class T>
inline void read(T &x) {
	static bool iosig;
	static char c;
	for (iosig = false, c = read(); !isdigit(c); c = read()) {
		if (c == '-') iosig = true;
		if (c == -1) return;
	}
	for (x = 0; isdigit(c); c = read()) x = x * 10 + (c ^ '0');
	if (iosig) x = -x;
}

char sr[10000000],z[20];int C=-1,Z=0;
void Ot(){fwrite(sr,1,C+1,stdout),C=-1;}
void print(int x){
	if (x<0) sr[++C]='-',x=-x;
    while(z[++Z]=x%10+48,x/=10);
    while(sr[++C]=z[Z],--Z);sr[++C]='\n';
}
//int find(int x){return fa[x]=fa[x]==x?x:find(fa[x]);}

//void add(int x,int y,int z){to[++cnt]=y;v[cnt]=z;Next[cnt]=head[x];head[x]=cnt;}
const int N=100100;
int a[N],tong[3][N],q[3];

int main()
{
	int n;
	read(n);
	for (int i=1;i<=n;i++) read(a[i]),tong[i&1][a[i]]++;
	q[0]=q[1]=0;
	for (int i=1;i<=1e5;i++)
	{
		if (q[0]<tong[0][i]) q[0]=tong[0][i];
		else
		if (q[1]<tong[1][i]) q[1]=tong[1][i];
	}
	ans=n-q[0]-q[1];
	q[0]=0;q[1]=0;
	for (int i=1;i<=1e5;i++)
	{
		if (q[1]<tong[1][i]) q[1]=tong[1][i];
		else
		if (q[0]<tong[0][i]) q[0]=tong[0][i];
	}
/*
	int flag=0;
	for (int i=1;i<=1e5;i++)
	{
		if (q[0]==tong[0][i]&&q[1]!=tong[1][i]) flag=1;
	}
*/
//	if (flag)
	cout<<min(ans,n-q[1]-q[0]);
//	else cout<<n/2;
	return 0;
}








Measured memory_bytes: 3456