read n
read -d ""
num1=$(echo "${REPLY}" | grep " " |sort -u | wc -l)
num2=$(echo "${REPLY}" | grep " " |sort -nu | wc -l)
num3=$(echo "${REPLY}" | grep " 0$" |sort -nu | wc -l | awk '{print $1 / 2}' | awk -F\. '{print $1}')
num=$((n - $((num1 - num2 + ${num3:-0}))))
if [ "${num:0:1}" == "-" ]
then
  echo 0
else
  echo $num
fi