#include <bits/stdc++.h>
using namespace std;
int main() {
  int x;
  cin >> x;
  int r = 0;
  while (x != 0) {
    if (x & 1 == 1) {
      r++;
      x = x >> 1;
    } else {
      x = x >> 1;
    }
  }
  cout << r;
}
