#include <iostream>
using namespace std;
int main() {
int k=0, n;
cin >> n;
while (n > 0){
k += (n % 2);
n = n / 2;
}
cout << k;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgaz0wLCBuOwoJY2luID4+IG47Cgl3aGlsZSAobiA+IDApewkKCQlrICs9IChuICUgMik7CgkJbiA9IG4gLyAyOwoJfQoJY291dCA8PCBrOwoJcmV0dXJuIDA7Cn0=