function Main(input) {
  var data = input.split("\n")
  // var n = parseInt(data[0])
  var v = data[1].split(' ').map(function(vd) {
    return parseInt(vd)
  })
  var c = 0;
  if (v[0] === v[1]) {
    v[1] = 'a'
    c++;
  }

  for (var i = 2; i < v.length; i = i + 2) {
    if (v[0] !== v[i]) {
      c++;
    }
  }

  for (var i = 3; i < v.length; i = i + 2) {
    if (v[1] !== v[i]) {
      c++;
    }
  }

  console.log(c);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));