#include <iostream>
#include <sstream>
using namespace std;
int main() {
stringstream convertor;
int result = -1;
convertor << std::noskipws << "";
convertor >> result;
if (convertor.fail() || convertor.eof() == false)
result = -1;
cout << "Result [" << result << "]" << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJc3RyaW5nc3RyZWFtIGNvbnZlcnRvcjsKCWludCByZXN1bHQgPSAtMTsKICAgIGNvbnZlcnRvciA8PCBzdGQ6Om5vc2tpcHdzIDw8ICIiOwogICAgY29udmVydG9yID4+IHJlc3VsdDsKICAgIAogICAgaWYgKGNvbnZlcnRvci5mYWlsKCkgfHwgY29udmVydG9yLmVvZigpID09IGZhbHNlKQogICAgCXJlc3VsdCA9IC0xOwogICAgCiAgICBjb3V0IDw8ICJSZXN1bHQgWyIgPDwgcmVzdWx0IDw8ICJdIiA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=