object Main extends App {
  val MOD = 1000000007
  val n = readLine.toInt
  val a = readLine.split(" ").map(_.toInt)

  val groupByMap = a.groupBy(x => x)

  val ans = groupByMap.foldLeft(0){case (s, (n, arr)) =>
    if(arr.length >= n) s + arr.length - n
    else s + arr.length
  }

  println(ans)
}
