function Main(input) {
  let [l, ...valArr] = input.split('\n')
  valArr = valArr.map(e=>parseFloat(e))
  let result = []
  for(let ele of valArr){
    let opArr = valArr.filter(e=> e!==ele && ele<e)
    let temp = opArr.map(e=>{
    	if((e*ele)%1===0){
        	return [ele, e]
        }
    })
    temp =temp.filter(e=>e!==undefined)
    if(temp.length){result = [...result, ...temp]}
  }
  console.log(result.length)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));