<?php
$N = trim(fgets(STDIN));
$A = explode(" ", trim(fgets(STDIN)));
$array = array();
for($i = 0; $i < $N; $i++) {
  $n = $A[$i];
  if(array_key_exists($n, $array)) {
    $array[$n]++;
  } else {
    $array[$n] = 1;
  }
}
$ans = 0;
foreach($array as $key => $value) {
  if($value == 1) $ans++;
}
print($ans);
?>