Program bitcount; Var n,c:longint; Begin readln(n); c:=0; while n <> 0 do begin if n mod 2 = 1 then c:=c+1; n:=n div 2; end; writeln(c); readln; End.