1.
#include <iostream>
using namespace std;
int main()
{
int n, s = 0;
while (n != 0)
{
cin >> n;
if (n % 2 == 0)
{
s++;
}
}
cout << s;
return 0;
}
2.
#include <iostream>
using namespace std;
int main()
{
int n, s = 0;
cin >> n;
for (int i = 2; i <= n; i += 2)
{
s += i;
}
cout << s;
return 0;
}