implementation of builtin function for counting setbits
#include <iostream>
using namespace std;
int main()
{
int n1;
cin>>n1;
long long n2;
cin>>n2;
// for counting setbits for int range bits
cout << __builtin_popcount(n1) << endl;
// for counting setbits for long long range bits
cout << __builtin_popcountll(n2) << endl;
return 0;
}