#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::vector;
int main() {
  long long n;
  cin >> n;
  int t = 0;
  while (n > 0) {
    if (n % 2 != 0) t++;
    n = n / 2;
  }
  cout << t;
  int h;
  cin >> h;
  return 0;
}
