#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define demo(f,x) cout << #f << "(" << x << ") = " << f(x) << endl
template<typename T> int ones_count_32(T x) { return __builtin_popcount(x); }
template<typename T> int leading_zeros_count_32(T x) { return __builtin_clz(x); }
template<typename T> int trailing_zeros_count_32(T x) { return __builtin_ctz(x); }
template<typename T> int ones_count_64(T x) { return __builtin_popcountll(x); }
template<typename T> int leading_zeros_count_64(T x) { return __builtin_clzll(x); }
template<typename T> int trailing_zeros_count_64(T x) { return __builtin_ctzll(x); }
void demo_32(int x) {
demo(ones_count_32,x), demo(leading_zeros_count_32,x), demo(trailing_zeros_count_32,x); }
void demo_64(ll y) {
demo(ones_count_64,y), demo(leading_zeros_count_64,y), demo(trailing_zeros_count_64,y); }
int main() {
int x; ll y; cin >> x >> y, demo_32(x), demo_64(y); }
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnVzaW5nIGxsID0gbG9uZyBsb25nOwojZGVmaW5lIGRlbW8oZix4KSBjb3V0IDw8ICNmIDw8ICIoIiA8PCB4IDw8ICIpID0gIiA8PCBmKHgpIDw8IGVuZGwKCnRlbXBsYXRlPHR5cGVuYW1lIFQ+IGludCAgICAgICAgICAgb25lc19jb3VudF8zMihUIHgpIHsgcmV0dXJuIF9fYnVpbHRpbl9wb3Bjb3VudCh4KTsgfQp0ZW1wbGF0ZTx0eXBlbmFtZSBUPiBpbnQgIGxlYWRpbmdfemVyb3NfY291bnRfMzIoVCB4KSB7IHJldHVybiBfX2J1aWx0aW5fY2x6KHgpOyB9CnRlbXBsYXRlPHR5cGVuYW1lIFQ+IGludCB0cmFpbGluZ196ZXJvc19jb3VudF8zMihUIHgpIHsgcmV0dXJuIF9fYnVpbHRpbl9jdHooeCk7IH0KCnRlbXBsYXRlPHR5cGVuYW1lIFQ+IGludCAgICAgICAgICAgb25lc19jb3VudF82NChUIHgpIHsgcmV0dXJuIF9fYnVpbHRpbl9wb3Bjb3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