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