#include<iostream>
using namespace std;
class Solution {
public:
int hammingWeight(uint32_t n) {
if (n == 0)
return 0;
else
return (n & 1) + hammingWeight(n >> 1);
}
};
int main()
{
unsigned int n;
cin >> n;
Solution ss;
cout << ss.hammingWeight(n);
return 0;
}