#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int count = 0;
  while (n) {
    if (n & 1) {
      count++;
    }
    n >>= 1;
  }
  cout << count << endl;
  return 0;
}
