#include <sstream>
#include <iostream>
double resultado(std::string valor)
{
std::istringstream iss(valor);
int X, Y;
iss >> X >> Y;
return X + Y;
}
int main()
{
double z = resultado("1+2");
std::cout << z << std::endl;
}
I2luY2x1ZGUgPHNzdHJlYW0+CiNpbmNsdWRlIDxpb3N0cmVhbT4KCmRvdWJsZSByZXN1bHRhZG8oc3RkOjpzdHJpbmcgdmFsb3IpCnsKCXN0ZDo6aXN0cmluZ3N0cmVhbSBpc3ModmFsb3IpOwoJaW50IFgsIFk7CgkKCWlzcyA+PiBYID4+IFk7CglyZXR1cm4gWCArIFk7Cn0KCmludCBtYWluKCkKewoJZG91YmxlIHogPSByZXN1bHRhZG8oIjErMiIpOwoKICAgIHN0ZDo6Y291dCA8PCB6IDw8IHN0ZDo6ZW5kbDsKfQ==