function Main (input) {
  var data = input.split("\n")
  var n = parseInt(data[0])
  var v = data[1].split(' ')
  var c0 = 0;
  var c1 = 0;

  var object1 = {}
  for (var i = 0; i < n; i = i + 2) {
    if (!object1[v[i]]) {
      object1[v[i]] = 0
    }
    object1[v[i]]++
  }

  var m0 = null
  var m0max = null
  for (var k in object1) {
    if (m0 === null) {
      m0 = k
      m0max = object1[k]
    }

    if (object1[k] > m0max) {
      m0 = k
      m0max = object1[k]
    }
  }

  var object2 = {}
  for (var i = 1; i < n; i = i + 2) {
    if (!object2[v[i]]) {
      object2[v[i]] = 0
    }
    object2[v[i]]++
  }

  var m1 = null
  var m1max = null
  for (var k in object2) {
    if (m1 === null) {
      m1 = k
      m1max = object2[k]
    }

    if (object2[k] > m1max) {
      m1 = k
      m1max = object2[k]
    }
  }

  if (m0 === m1) {
    if (object1[m0] > object2[m1]) {
      delete object2[m1]

      if (Object.keys(object2).length === 0) {
        console.log(n / 2)
        return
      }

      m1 = null
      m1max = null
      for (var k in object2) {
        if (m1 === null) {
          m1 = k
          m1max = object2[k]
        }

        if (object2[k] > m1max) {
          m1 = k
          m1max = object2[k]
        }
      }
    } else {
      delete object1[m1]

      if (Object.keys(object1).length === 0) {
        console.log(n / 2)
        return
      }

      m0 = null
      m0max = null
      for (var k in object1) {
        if (m0 === null) {
          m0 = k
          m0max = object1[k]
        }

        if (object1[k] > m0max) {
          m0 = k
          m0max = object1[k]
        }
      }
    }
  }

  for (var i = 0; i < n; i = i + 2) {
    if (m0 !== v[i]) {
      c0++;
    }
  }

  for (var i = 1; i < n; i = i + 2) {
    if (m1 !== v[i]) {
      c1++;
    }
  }

  var c = c0 + c1;

  console.log(c);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));