#include <stdio.h>
int main(void) {
unsigned int v = 0xCF31; // some number
v = v - ((v >> 1) & 0x55555555); // reuse input as temporary
v = (v & 0x33333333) + ((v >> 2) & 0x33333333); // temp
unsigned int c = ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24; // count
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CiAgICB1bnNpZ25lZCBpbnQgdiA9IDB4Q0YzMTsgLy8gc29tZSBudW1iZXIKICAgIHYgPSB2IC0gKCh2ID4+IDEpICYgMHg1NTU1NTU1NSk7ICAgICAgICAgICAgICAgICAgICAvLyByZXVzZSBpbnB1dCBhcyB0ZW1wb3JhcnkKICAgIHYgPSAodiAmIDB4MzMzMzMzMzMpICsgKCh2ID4+IDIpICYgMHgzMzMzMzMzMyk7ICAgICAvLyB0ZW1wCiAgICB1bnNpZ25lZCBpbnQgYyA9ICgodiArICh2ID4+IDQpICYgMHhGMEYwRjBGKSAqIDB4MTAxMDEwMSkgPj4gMjQ7IC8vIGNvdW50CiAgICBwcmludGYoIiV1XG4iLCBjKTsKICAgIHJldHVybiAwOwp9