#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, c = 0, ans;
  cin >> n;
  while (n) {
    if (n % 2) c++;
    n /= 2;
  }
  cout << c << endl;
}
