#include int main() { unsigned sum = 0; while (true) { int i; std::cin >> i; if (i < 0) { break; } sum += i; } std::cout << sum << '\n'; }