print((function (_, s) local h,r = {},0 for e in s:gmatch("%d+") do if h[e]==nil then h[e]=0 end h[e]=h[e]+1 end for _,v in pairs(h) do if v==1 then r=r+1 end end return r end)(io.stdin:read("*l"), io.stdin:read("*l")))