#include <bits/stdc++.h>
using namespace std;
bool check(char x) {
  int t = (int)x;
  if (t >= 65 && t <= 90) {
    return true;
  }
  return false;
}
char changed(char y) {
  char t;
  if (check(y)) {
    t = y - 'A' + 'a';
  } else {
    t = y - 'a' + 'A';
  }
  return t;
}
int main() {
  int n;
  cin >> n;
  int t = n, ans = 0;
  while (t > 0) {
    ans += t & 1;
    t = t >> 1;
  }
  cout << ans << endl;
  return 0;
}
