'use strict'
const main = arg => {
	const input = arg.trim().split("\n");
	let As = input[0].split(' ').map(a => Number(a))
	let sameCount = 0
	As = As.sort((a,b) => a-b)
	for(let i = 1; i < As.length ; i++) {
		if(As[i - 1] === As[i]) { 
			sameCount++ 
		} 
	}
	let uniqueCount = As.length - sameCount
	console.log(uniqueCount - sameCount % 2)
}   
main(require('fs').readFileSync('/dev/stdin', 'utf8'));