#include <iostream>
int main(){
double w = 1 / 2.0, r = 0;
for (int i = 0; i <= 50; ++i) {
w *= 3;
r += w;
}
std::cout << r;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgppbnQgbWFpbigpewogIGRvdWJsZSB3ID0gMSAvIDIuMCwgciA9IDA7CiAgZm9yIChpbnQgaSA9IDA7IGkgPD0gNTA7ICsraSkgewogICAgdyAqPSAzOwogICAgciArPSB3OwogIH0KICBzdGQ6OmNvdXQgPDwgcjsKICByZXR1cm4gMDsKfQ==