local n=io.read("n")
io.read()
local smap={}
for i=1,n do
    local input=io.read()
    smap[input]=(smap[input] or 0)+1
end

local counter=0
for k,v in pairs(smap) do
    counter=counter+1
end
print(counter)