import java.util.*;
import java.lang.*;
import java.io.*;
class Brovko
{
{
double sum=0, a;
Scanner in
= new Scanner
(System.
in); while(in.hasNext())
{
a = in.nextDouble();
if (a<0)
{
break;
}
sum+=a;
}
System.
out.
format("Сумма членов последовательности до первого отрицательного элемента равна %5.1f \n",sum
); }
}
CmltcG9ydCBqYXZhLnV0aWwuKjsKaW1wb3J0IGphdmEubGFuZy4qOwppbXBvcnQgamF2YS5pby4qOwoKY2xhc3MgQnJvdmtvCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgp7Cglkb3VibGUgc3VtPTAsIGE7IAkKCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJd2hpbGUoaW4uaGFzTmV4dCgpKQoJewoJCWEgPSBpbi5uZXh0RG91YmxlKCk7CgkJaWYgKGE8MCkKCQl7CgkJCWJyZWFrOwoJCX0KCQlzdW0rPWE7Cgl9CgkJU3lzdGVtLm91dC5mb3JtYXQoItCh0YPQvNC80LAg0YfQu9C10L3QvtCyINC/0L7RgdC70LXQtNC+0LLQsNGC0LXQu9GM0L3QvtGB0YLQuCDQtNC+INC/0LXRgNCy0L7Qs9C+INC+0YLRgNC40YbQsNGC0LXQu9GM0L3QvtCz0L4g0Y3Qu9C10LzQtdC90YLQsCDRgNCw0LLQvdCwICU1LjFmIFxuIixzdW0pOwp9Cn0=