#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"from collections import*\n"
"n,*v=map(int,open(0).read().split())\n"
"a=Counter(v[::2]).most_common()+[(0,0)]\n"
"b=Counter(v[1::2]).most_common()+[(0,0)]\n"
"if a[0][0]==b[0][0]:\n"
"    print(min(n-a[0][1]-b[1][1],n-a[1][1]-b[0][1]))\n"
"else:\n"
"    print(n-a[0][1]-b[0][1])\n"
"\"";
  system(s);
  return 0;
}            