const line=readline();
const res=parseInt(line).toString(2);
const len=[...res]
let num=0;
for(let i=0;i<=len.length;i++){
    if(len[i]==1){
        num+=1
    }
}
console.log(num)