#include <bits/stdc++.h>
using namespace std;
long long x;
long long int_to_bin(long long x) {
  long long BN[32];
  long long i = 0, k = 0;
  while (x > 0) {
    BN[i] = x % 2;
    x /= 2;
    i++;
  }
  for (int j = i - 1; j >= 0; j--)
    if (BN[j] == 1) k++;
  return k;
}
int main() {
  ios::sync_with_stdio(NULL);
  cin.tie(0);
  cout.tie(0);
  cin >> x;
  cout << int_to_bin(x);
  return 0;
}
