#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, c = 0;
  cin >> b;
  while (b) {
    if (b % 2 == 0) {
      b = b / 2;
    } else {
      c++;
      b = b / 2;
    }
  }
  cout << c;
  return 0;
}
