#include<iostream>
using namespace std;
int number0(int n);
int main(){
int n;
cin >> n;
cout<<number0(n);
return 0;
}
int number0(int n){
int cnt = 0;
while (n){
++cnt;
n = (n - 1) &n;
}
return cnt;
}
#include<iostream>
using namespace std;
int number0(int n);
int main(){
int n;
cin >> n;
cout<<number0(n);
return 0;
}
int number0(int n){
int cnt = 0;
while (n){
++cnt;
n = (n - 1) &n;
}
return cnt;
}