#include <bits/stdc++.h>
using namespace std;
int setBitNumber(int n) {
  int k = (int)(log2(n));
  return (int)(pow(2, k));
}
int main() {
  long long int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    bitset<128> m(n);
    cout << m.count();
  }
}
