var x,c:longint; begin readln(x); if x mod 2=0 then c:=0 else c:=1; while x<>0 do begin x:=x div 2; c:=c+x mod 2; end; writeln(c); end.