var n,x:int64; begin readln(n); x:=0; repeat x:=x+n mod 2; n:=n div 2 until n=0; writeln(x) end.