program Project2; {$APPTYPE CONSOLE} var b:array[1..1000000]of longint; r,k,n,i:longint; begin assign(input,'input.dat'); reset(input); assign(output,'output.ans'); rewrite(output); for i:=1 to 1000000 do b[i]:=0; readln(n); for i:=1 to n do begin read(r); b[r]:=1; end; k:=0; for i:=1 to 1000000 do begin if (b[i]=1) and ((i mod 2)=1) then k:=k+1; if (b[i]=1) and ((i mod 2)=0)and (b[i div 2]=0)then k:=k+1; if (b[i]=1)and((i mod 2)=0)and (b[i div 2]=1)then b[i]:=0; end; writeln(k); close(output); close(input); { TODO -oUser -cConsole Main : Insert code here } end.