uses crt;
var a:array[0..10000007] of longint;
procedure sort(l,r:longint);
var i,j,x,tmp:longint;
begin
i := l; j := r; x := a[(i+j) div 2];
repeat
while a[i] < x do inc(i);
while a[j] > x do dec(j);
if (i <= j) then
begin
tmp := a[i];
a[i] := a[j];
a[j] := tmp;
inc(i);dec(j);
end;
until (i > j);
if (l<j) then sort(l,j);
if (i<r) then sort(i,r);
end;
var i,n,d:longint;
begin
clrscr;
readln(n);
for i := 1 to n do read(a[i]);
sort(1,n);
for i := 1 to n do
if (a[i] <> a[i+1]) then inc(d);
writeln(d);
readln; readln;
end.