#include
using namespace std;
int main()
{
int n = 0, f = 0, t = 0;
cin >> n;
if (n <= 1015 && n >= 1) {
for (int i = 1; i <= n; ++i) {<br> t = -i;
if (i % 2 == 0) {
t = abs(t);
}
cout << t << " ";<br>f += t;
}
} else {
cout << "Error" << endl;<br>}
cout << endl << "Res: " << f;<br>return 0;
}