#include int main() { int n, c = 0; for (std::cin >> n; n; n >>= 1) c += n & 1; std::cout << c << std::endl; return 0; }