#include <bits/stdc++.h>
unsigned bactery_count(unsigned num) {
  unsigned res = 0;
  while (num > 0) {
    (num & true) ? ++res, --num : num >>= 1;
  }
  return res;
}
int main() {
  unsigned num;
  std::cin >> num;
  std::cout << bactery_count(num) << std::endl;
  return 0;
}
