function Main(input) {
  var len = input.split("\n")[0];
  var list = input.split("\n")[1].split(" ");
  
  var used = [];
  for(var i = 0; i < list.length; i++){
    if(used.indexOf(list[i]) == -1){
       used.push(list[i]);
       }
  }
  
  if(used.length % 2 == 1){
     console.log(used.length);
     }else{
     console.log(used.length - 1);
     }
  
}

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