var input = require("fs").readFileSync("/dev/stdin", "utf8");

var lines = input.split('\n');
var N = Number(lines[0]);
var words = lines[1].split(' ');

var map = {};
for (var i = 0; i < N; i++) {
    var n = Number(words[i]);
    map[n] = map[n] || 0;
    map[n]++;
}

var sum = 0;
for (key in map) {
    var n = Number(key);
    var v = map[key];
    var diff = v - n;
    if (diff > 0) {
        sum += diff;
    } else if (diff < 0) {
        sum += v;
    }
}
console.log(sum);
