#include <iostream>
#include <sstream>
#include <string>
int main()
{
std::istringstream iss("2.832 1.3067 nana1.678 x-1E2 xxx.05 meh.ugh");
double num = 0;
for (; iss; )
if (iss >> num)
std::cout << num << '\n';
else if (!iss.eof())
{
iss.clear();
iss.ignore(1);
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCmludCBtYWluKCkKewogICAgc3RkOjppc3RyaW5nc3RyZWFtIGlzcygiMi44MzIgMS4zMDY3IG5hbmExLjY3OCB4LTFFMiB4eHguMDUgbWVoLnVnaCIpOwogICAgZG91YmxlIG51bSA9IDA7CiAgICBmb3IgKDsgaXNzOyApCiAgICAJaWYgKGlzcyA+PiBudW0pCiAgICAJICAgIHN0ZDo6Y291dCA8PCBudW0gPDwgJ1xuJzsKICAgIAllbHNlIGlmICghaXNzLmVvZigpKQogICAgCXsKICAgIAkJaXNzLmNsZWFyKCk7CiAgICAgICAgICAgIGlzcy5pZ25vcmUoMSk7CiAgICAJfQp9