#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  scanf("%lld", &n);
  long long count = 0;
  while (n != 0) {
    if (n & 1 == 1) count++;
    n = n >> 1;
  }
  printf("%lld", count);
  return 0;
}
