n = io.read("*n")
rem = 0
t = {}
s = {}
for i = 1, n do
    a = io.read("*n")
    if(n < a) then
        rem = rem + 1
    elseif(s[a] ~= nil) then
        rem = rem + 1
    else
        if(t[a] == nil) then
            t[a] = 1
        else
            t[a] = t[a] + 1
        end
        if(t[a] == a) then
            s[a] = true
            t[a] = 0
        end
    end
end
for k, v in pairs(t) do
    rem = rem + v
end
print(rem)