const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const N = Number(lines.next().value); const A = lines.next().value.split(' '); const count = new Map(); A.forEach(x => { if (!count.has(x)) { count.set(x, 0); } count.set(x, count.get(x) + 1); }); console.log([...count.values()].reduce((a, x) => a + Number(x === 1), 0));