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