#include <bits/stdc++.h>
using namespace std;
const long long INF = 2000000000000000000LL;
const int inf = 0x3f3f3f3f;
const long double EPS = 1e-9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long x, i, j, n = 0, t;
  cin >> x;
  while (x / 2 != 0) {
    if (x % 2 == 1) n++;
    x = x / 2;
  }
  cout << n + 1 << "\n";
  return 0;
}
