import std.stdio;
import std.array;
import std.conv;
import std.algorithm;
struct Reader {
    char[][] inputs;
    ulong idx;
    bool nextLine() {
        char[] buf;
        if(readln(buf)==0) return 0;
        inputs=split(buf);
        idx=0;
        return 1;
    }
    char[] nextItem() {
        if(idx==inputs.length) {
            nextLine();
            idx=0;
        }
        return inputs[idx++];
    }
    int nxtInt() {
        return to!int(nextItem());
    }
    double nxtDouble() {
        return to!double(nextItem());
    }
    char[] nxtStr() {
        return nextItem();
    }
}
void main() {
    Reader r;
    int N=r.nxtInt();
    int[] a;
    for(int i=0;i<N;i++) a~=r.nxtInt();
    a.length-=a.sort.uniq.copy(a).length;
    writeln(a.length);
}