#include <bits/stdc++.h>
using namespace std;

int main( void ) {
    ios::sync_with_stdio( false );
    
    int n;
    
    cin >> n;
    cout << __builtin_popcount( n ) << endl;
    
    return 0;
}