#include<bits/stdc++.h>
using namespace std;
using ll = long long;
// #undef DEBUG
// #define DEBUG
// DEBUG {{{
// clang-format off
template<int n, class...T> typename enable_if<(n>=sizeof...(T))>::type _ot(ostream &, tuple<T...> const &){}
template<int n, class...T> typename enable_if<(n< sizeof...(T))>::type _ot(ostream & os, tuple<T...> const & t){ os << (n==0?"":", ") << get<n>(t); _ot<n+1>(os, t); }
template<class...T> ostream & operator<<(ostream &o, tuple<T...> const &t){ o << "("; _ot<0>(o, t); o << ")"; return o; }
template<class T, class U> ostream & operator<<(ostream &o, pair<T, U> const &p) { o << "(" << p.first << ", " << p.second << ")"; return o; }
template < class T > ostream &operator<<(ostream &o, const stack<T> &a) { o << "{"; for(auto tmp = a; tmp.size(); tmp.pop()) o << (a.size() == tmp.size() ? "" : ", ") << tmp.top(); o << "}"; return o; }
#ifdef DEBUG
#if !defined(DEBUG_OUT)
// #define DEBUG_OUT cerr
#endif
#define dump(...) [&](){auto __debug_tap=make_tuple(__VA_ARGS__);DEBUG_OUT<<"["<<__LINE__<< "] "<<#__VA_ARGS__<<" = "<<__debug_tap<<"\n";}()
template < class T > inline void dump2D(T &d, size_t sizey, size_t sizex) { for(size_t i = 0; i < sizey; i++) { DEBUG_OUT << "\t"; for(size_t j = 0; j < sizex; j++) DEBUG_OUT << d[i][j] << (j + 1 == sizex ? "" : "\t"); DEBUG_OUT << endl; } }
template < class T, class = typename iterator_traits< typename T::iterator >::value_type, class = typename enable_if<!is_same<T, string>::value>::type > ostream &operator<<(ostream &o, const T &a) { o << "{"; for(auto ite = a.begin(); ite != a.end(); ++ite) o << (ite == a.begin() ? "" : ", ") << *ite; o << "}"; return o; }
#else
#define dump(...) (42)
#define dump2D(...) (42)
template < class T, class = typename iterator_traits< typename T::iterator >::value_type, class = typename enable_if<!is_same<T, string>::value>::type > ostream &operator<<(ostream &o, const T &a) { for(auto ite = a.begin(); ite != a.end(); ++ite) o << (ite == a.begin() ? "" : " ") << *ite; return o; }
#endif
// clang-format on
// }}}

int a[112345];
int main() {
  std::ios::sync_with_stdio(false), std::cin.tie(0);
  int n;
  cin >> n;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  ll ans = 0;

  vector<int> cnt(112345);
  int c0 = 0;
  for(int i = 0; i < n; i+=2) {
    cnt[a[i]]++;
    c0++;
  }
  int ma0 = 0;
  int ma1 = 0;
  for(int i = 1; i <= 1e5; i++) if(cnt[i]) {
    if(ma0 == -1 || cnt[ma0] < cnt[i]) {
      ma1 = ma0;
      ma0 = i;
    } else if(ma1 == -1 || cnt[ma1] < cnt[i]) {
      ma1 = i;
    }
  }
  vector<int> cnt1(112345);
  int ma2 = 0;
  int ma3 = 0;
  int c1 = 0;
  for(int i = 1; i < n; i+=2) {
    cnt1[a[i]]++;
    c1++;
  }
  for(int i = 1; i <= 1e5; i++) if(cnt1[i]) {
    if(ma2 == -1 || cnt1[ma2] < cnt1[i]) {
      ma3 = ma2;
      ma2 = i;
    } else if(ma3 == -1 || cnt1[ma3] < cnt1[i]) {
      ma3 = i;
    }
  }
  if(ma0 == ma2) {
    ans = min(
        c0 - cnt[ma0] + c1 - cnt1[ma3],
        c0 - cnt[ma1] + c1 - cnt1[ma2]
        );
  } else {
    ans = c0 - cnt[ma0] + c1 - cnt1[ma2];
  }
  dump(ma0, ma1);
  dump(ma2, ma3);
  dump(cnt[ma0], cnt[ma1]);
  dump(cnt1[ma2], cnt1[ma3]);
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 1536