#include using namespace std; long long n, r; int main () { cin>>n; if (n==0) { cout<<0; } else { while (n!=0) { if (n%2==1) { r++; } n/=2; } cout<