#include <bits/stdc++.h>
int main() {
  int x, remainder, no_of_1s = 0;
  scanf("%d", &x);
  while (x > 0) {
    remainder = x % 2;
    if (remainder == 1) no_of_1s++;
    x = x / 2;
  }
  printf("%d", no_of_1s);
  return 0;
}
