#include <bits/stdc++.h> using namespace std; int n,k; int main() { cin>>n; while(n){ if(n%2 == 1) k++; n/=2; } cout<<k; return 0; }