#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define faster() ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define mod 1000000007
#define maxN 10005
void solve(){
int x ; cin >> x ;
cout << __builtin_popcount(x);
}
signed main(){
faster();
int test = 1 ;
// cin >> test;
while(test--){
solve();
}
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBlbmRsICJcbiIKI2RlZmluZSBpbnQgbG9uZyBsb25nCiNkZWZpbmUgZmFzdGVyKCkgaW9zOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOyBjaW4udGllKG51bGxwdHIpOyBjb3V0LnRpZShudWxscHRyKTsKI2RlZmluZSBtb2QgMTAwMDAwMDAwNwojZGVmaW5lIG1heE4gMTAwMDUKdm9pZCBzb2x2ZSgpewogICAgaW50IHggOyBjaW4gPj4geCA7CiAgICBjb3V0IDw8IF9fYnVpbHRpbl9wb3Bjb3VudCh4KTsKfQogCnNpZ25lZCBtYWluKCl7CiAgICBmYXN0ZXIoKTsKICAgIGludCB0ZXN0ID0gMSA7CiAgICAvLyBjaW4gPj4gdGVzdDsKICAgIHdoaWxlKHRlc3QtLSl7CiAgICAgICAgc29sdmUoKTsKICAgIH0KfQ==