#include using namespace std; int N,cnt; int main() { scanf("%d",&N); for(;N;N>>=1) cnt+=N&1; printf("%d\n",cnt); return 0; }