#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  long long count = 0;
  while (t > 0) {
    if (t % 2 == 1) count++;
    t /= 2;
  }
  cout << count << endl;
  return 0;
}
