// even1.cpp: Solution without go-to statements

#include <iostream>
using namespace std;

int main() {

int x, s = 0;
cout << "Enter positive integers, followed by -1:\n";
for (;;) {
 cin >> x;
 if (x == -1) break;
 if (x % 2 == 0) s += x;
} 
cout << "Sum of even integers: " << s << endl;
return 0;

}
