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