#include <iostream>
using namespace std;

int main()
{
    int n;
    unsigned int x;
    cin>>n;
    cout<<__builtin_popcount(n);
    return 0;
}