#include <iostream>
#include <cstring>
using namespace std;
int b2i(bool v)
{
return v << 1;
}
int main() {
bool v = true;
cout << "v = " << v << endl;
cout << "b2i(v) = " << b2i(v) << endl;
memset(&v, -1, sizeof v);
cout << "b2i(v) = " << b2i(v) << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBiMmkoYm9vbCB2KQp7CiAgICByZXR1cm4gdiA8PCAxOwp9CgppbnQgbWFpbigpIHsKCWJvb2wgdiA9IHRydWU7Cgljb3V0IDw8ICJ2ID0gIiA8PCB2IDw8IGVuZGw7Cgljb3V0IDw8ICJiMmkodikgPSAiIDw8IGIyaSh2KSA8PCBlbmRsOwoJbWVtc2V0KCZ2LCAtMSwgc2l6ZW9mIHYpOwoJY291dCA8PCAiYjJpKHYpID0gIiA8PCBiMmkodikgPDwgZW5kbDsKCXJldHVybiAwOwp9