#include<iostream>
using namespace std;
int main()
{
    long long n;
    cin>>n;
    if(n%2==0)
        cout<<n/2;
    else
        cout<<-n/2-1;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n;
    cin>>n;
    if(n%2!=0)
    {
        long long int z=n/2;
        cout<<z-n;
    }
    else
    cout<<n/2;
}

# include <iostream>

int main() {
	signed long long int a;
	std::cin >> a;
	if (a % 2 == 0) a = (a * -0.5) + a;
	else a = (a+1) * -0.5;
	std::cout << a;
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
	 __int64 n, i, s = 0,c;
	 double d;
	cin >> n;
	s = -ceil(n / 2.);
	if (n % 2 == 0)
		cout << n / 2;
	else cout << s;
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
long long n;
cin>>n;
(n%2==0)?cout<<n/2:cout<<n/2-n;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
	long long int s;
	cin>>s;
	if(s%2) cout<<s/2-s;
	else cout<<s/2;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
	long long int s;
	cin>>s;
	if(s%2==1) cout<<s/2-s;
	else cout<<s/2;
}

#include<iostream>
using namespace std;
int main()
{
    long long n;
    cin>>n;
    double s=0;
    s=ceil(double(n)/2);
    if(n%2==0)
        cout<<long long (s);
    else
        cout<<long long (s*(-1));

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    /*unsigned */long long int n,ans,ul;
    cin>>n;
    if(n%2==0){
       cout<<n/2<<endl;
    }

    else{
            ul=n/2;
    ans=ul-n;
        cout<<ans<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n,ans;
    scanf("%lld",&n);
    if(n%2==0){
        ans=n/2;
    }
    if(n%2==1){
        ans=(n-1)/2-n;
    }
    printf("%lld\n",ans);
    return 0;
}

#include"stdio.h"
#include<string.h>
#include"math.h"
void main()
{
	long long n;
	scanf("%lld", &n);
	long long s = 0;
	if (n % 2 == 0)
		s = n / 2;
	else
		s = n / 2 - n;
	printf("%lld", s);
}

#include<iostream>
using namespace std;
int main()
{
    long long n;
    cin>>n;
    cout<<n/2-n%2*n;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    long long n;
    cin>>n;
    if(n%2==0)
        cout<<n/2;
    else if(n%2==1)
    {
        cout << ((n/2)+1)*(-1);
    }

    return 0;
}

#include<iostream>
using namespace std;
long long int f(long long int);
int main()
{
	long long int n;
	cin >> n;
	cout << f(n) << endl;
}
long long int f(long long int n)
{
	long long int sum = 0;
	if (n % 2 == 0) sum = n / 2;
	else sum = ((n - 1) / 2) - n;
	return sum;
}

//be name khoda

#include<iostream>

using namespace std;

long int parse(string n){
	int len = n.size();
	int res = 0;
	for (int i = 0; i < len; i++){
		res *= 10;
		res += n.at(i) - 48;
	}
	return res;
}

string extendTo8 (int n){
	string s = "";
	int ted = 0;
	while (n > 0){
		ted++;
		n /= 10;
	}
	for (int i = 0; i < 8 - ted; i++){
		s = s + "0";
	}
	return s;
}

int main(){
	string n;
	cin >> n;
	int t = n.size();
	int hi, lo;
	string Hi = "";
	string Lo = "";
	for(int i = t - 1; i >= 0; i--){
		if(i < t - 8){
			Hi = n.at(i) + Hi;
		}else{
			Lo = n.at(i) + Lo;
		}
	}
	hi = parse(Hi);
	lo = parse(Lo);
//	cout << Hi << endl;
//	cout << Lo << endl;
//	cout << "Result:" << endl;
	if (lo %2 == 0){
		lo /= 2;
		if(hi %2 == 1){
			lo += 5e7;
		}
		hi /= 2;
	}else{
		cout << "-";
		lo++;
		if(lo == 1e8){
			lo = 0;
			hi++;
		}
		lo /= 2;
		if(hi %2 == 1){
			lo += 5e7;
		}
		hi /= 2;
	}
	if (hi != 0){
		cout << hi;
		cout << extendTo8(lo);
		if(lo != 0){
			cout << lo;
		}
	}else{
		cout << lo;
	}
}

#include <iostream>
#include<cstring>
#include<cmath>

using namespace std;
void calculatingFunction();

int main() {
	calculatingFunction();
	return 0;
}
void calculatingFunction(){
	long long n;
	cin>>n;
	cout<<(n+1)/2-n%2*(n+1);
}

#include <iostream>
using namespace std;

int main() {
  long long int input;
  cin >> input;

  if (input%2 == 0){
    cout<< input/2;
  } else if (input%2 != 0){
    cout<< input/2 - input;
  }
}

#include<iostream>

using namespace std;

int main(){

	long long n, s=0;
	cin>>n;

	if(n%2==0){
		s=n/2;
	}
	else{
		s=(n/2)+1;
		s=s*(-1);
	}

	cout<<s<<endl;

	return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <stdio.h>
using namespace std;

int main() {
    //ios::sync_with_stdio(false);
    long long n;
    cin>>n;
    if(n%2==0){
        cout<<((long long)(n/2));
    }else{
        cout<<((long long)(-(n+1)/2));
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n,ans;
    scanf("%I64d",&n);
    if(n%2==0){
        ans=n/2;
    }
    if(n%2==1){
        ans=(n-1)/2-n;
    }
    printf("%I64d\n",ans);
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n,ans;
    scanf("%I64d",&n);
    if(n%2==0){
        ans=n/2;
    }
    if(n%2==1)
    {
        ans=-(((n-1)/2)+1);
    }
    printf("%I64d\n",ans);
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
	long long n,i;
	cin>>n;
	if(n%2==0)
		cout<<n/2;
	else
		cout<<-n/2-1;
	return 0;
}//就这

#include<stdio.h>
int main()
{
    long long ans,n;
    scanf("%lld",&n);
    if(n%2==0)
    {
        ans=n/2;
    }
    else
    {
        ans=(-1)*(n+1)/2;
    }

    printf("%lld\n",ans);
    return 0;
}

#include<iostream>
#include<string>
using namespace std;

int main()
{
	long long int n;
	cin>>n;

	if(n%2 == 0)
		cout<<n/2;
	else
		cout<<((n/2)+1)*-1;
}

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	long long n,f,r;
	cin >> n;
		r = pow(-1, n);
	if (n< 1)
	{
		return 0;
	}
	if (n % 2 == 0)
	{
		f = n / 2;
	}
	else if (n%2==1)
	{
		f = ((-n / 2) - 1);

	}
	cout << f;
}

#include<iostream>
#include<cmath>

using namespace std;
int main()
{
	long long n;
	long int sum1,sum2;
	cin>>n;
	if(n%2!=0)
	{
	cout<<-(n +1)/2;
    }
	else
	{
	 cout<<n/2;
	}
	return 0;
}

#include<iostream>

#include<string>

using namespace std;

int main()
{
  long long  int n,i;
    cin>>n;
    long long int sum=0,sn,sp;
    if(n%2==0)
    {
    sum=n/2;
     }
    else
    {
       sum=-(n+1)/2;
    }

    cout<<sum;
 return 0;
}

#include <stdio.h>
#include <conio.h>
#define _CRT_SECURE_NO_WARNINGS

int main()
{
	_int64 n, a, i;
	scanf("%lld", &n);
	if ((n % 2) == 0)
		printf("%lld", n / 2);
	else
		printf("%lld", (-n / 2-1));

	return 0;

}

#include<iostream>
#include<string>
#include<cstring>
#include<sstream>
#include<cctype>
#include<string.h>
#include<algorithm>
#include<cmath>
#include<stack>
#include<fstream>
#include<cstdlib>
#include<map>
#include<utility>
#include<iomanip>

using namespace std;

long long int n, out;

int main(){
    string a;
    cin>>n;
    if(n%2==0){
        out=n/2;
    }else if(n%2==1){
        n++;
        out=n/-2;
    }
    cout<<out;
}

#include <bits/stdc++.h>

using ll = long long;
using namespace std;
ll n,s;

int main()
{
    cin >> n;
    (n&1)?cout << (-1-n)/2:cout << n/2;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
long long n,ans;
int main(){
	cin>>n;
	if(n%2==0) ans=n/2;
	else ans=(n-1)/2-n;
	cout<<ans<<endl;
	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	long long x, sum = 0;
		cin >> x;
		if (x % 2 == 1)
		{
			sum = x/ 2;
if (sum % 2 == 0)
				cout<< (sum + 1)*-1 <<endl;
	else if (x > 100)
				cout<< -1 * (sum + 1) <<endl;
			else
				cout<<(sum + 1)<<endl;

		}
		else
		{
			sum = x / 2;
			cout<<sum<<endl;
		}
	return 0;
}

#include<bits/stdc++.h>

#define x first

#define y second

#define pb push_back

#define inf 0x3f3f3f3f

#define mod 1000000007

#define sq(x) ((x)*(x))

#define PQ priority_queue<pii, vector<pii>, greater<pii> >

using namespace std;

typedef double DO;

typedef long long INT;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

typedef vector<int> VI;

template<typename T, typename U> inline void smin(T &a, U b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, U b) {if (a<b) a=b;}

template<class T>inline void gn(T &x) {char c, sg=0; while (c=getchar(), (c>'9' || c<'0') && c!='-');for((c=='-'?sg=1, c=getchar():0), x=0; c>='0' && c<='9'; c=getchar()) x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;}

template<class T, class T1>inline void gn(T &x, T1 &y) {gn(x); gn(y);}

template<class T, class T1, class T2>inline void gn(T &x, T1 &y, T2 &z) {gn(x); gn(y); gn(z);}

template<class T>inline void print(T x) {if (x<0) {putchar('-');return print(-x);}if (x<10) {putchar('0'+x);return;} print(x/10);putchar(x%10+'0');}

template<class T>inline void printsp(T x) {print(x); putchar(' ');}

template<class T>inline void println(T x) {print(x); putchar('\n');}

template<class T, class U>inline void print(T x, U y) {printsp(x); println(y);}

template<class T, class U, class V>inline void print(T x, U y, V z) {printsp(x); printsp(y); println(z);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	INT  n,ans;

	gn(n);

	if(n%2==0) ans=n/2;

	else ans=n/2-n;

	cout<<ans;

	return 0;

}

#include<bits/stdc++.h>

using namespace std ;

long long int n ;
int main(){
    // freopen("input.txt","r",stdin);
    // freopen("output.txt","w",stdout);
    cin.sync_with_stdio(false);
    long long int n, sum;
    cin >> n ;
    // scanf("%lld",&n);
    if(n%2==0){
        sum = n/2 ;
    }
    else {
        sum = ((n+1)/2)*-1;
    }
    cout << sum ;
    // printf("%lld",sum);
    return 0 ;
}

#include<iostream>
using namespace std;
int main()
{
    long long int n,sum=0;
    cin>>n;
    if(n%2==0)
        sum=n/2;
    else
        sum=(-1-n)/2;

    cout<<sum;
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    long long a;
    cin>>a;
    if(a%2==0)
        cout<<a/2;
    else
        cout<<"-"<<(a+1)/2;
    return 0;
}

#include <iostream>
#include <string>
using namespace std;
int main ()
{
  long long sum ,n;
  cin>>n;
  sum = n / 2 - n % 2 * n;
 cout << sum <<endl;
    return 0;
  }

#include <bits/stdc++.h>
using namespace std;
int main(){

	long long int i,j,k,soma=0;

	cin >> k;

	if(k%2==0 && k!=1){
		cout << k/2 << endl;
	}else{
		cout << ((k+1)/2)*-1 << endl;
	}

	return 0;

}
// 1461633918100

#include <iostream>
#include <cmath>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n;
    cin>>n;
    long long int p;
    if(n % 2 == 1){
        p = -(n+1)/2;
    }
    else{
        p = n/2;
    }
    cout<<p;

    return 0;
}

#include<iostream>
using namespace std;
long long n;
int main()
{
    cin>>n;
    if(n%2)cout<<"-"<<(n+1)/2<<endl;
    else cout<<n/2<<endl;
    return 0;
}

#include <cstdio>

int main(int argc, char const *argv[])
{
	long long n;
	scanf("%lld", &n);
	if(n%2==0){
		printf("%lld\n", n/2);
	}else{
		printf("%lld\n", (-1*((n+1)/2)));
	}
	return 0;
}
// 1474651729830

#include <iostream>
using namespace std;

long long n;

int main()
{
cin>>n;
if (n % 2==0) cout<<n/2;
else cout<<n/2-n;
return 0;
}

#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <stdlib.h>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <functional>
#include <numeric>
#include <utility>
#include <deque>
#include <stack>
#include <bitset>
#include <map>
#include <set>
#include <string>
#include <vector>
#include <queue>
#include <limits>
#include <fstream>
#include <list>
#include <sstream>
#include <iostream>
#include <iomanip>

using namespace std;

//freopen( "input.txt", "r", stdin );
//freopen( "output.txt", "w", stdout );
//fflush( stdin );

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
#define INF 1000000000 //1 Billon
#define EPS 1e-9
#define MOD 1000000007
#define WHITE -1
#define BLACK 1
#define GRAY 2
#define PI acos(-1.0)

//int num_length( int n ) { return int( log10( n ) ) + 1; }
int gcd( int a, int b ){ return b == 0 ? a : gcd( b, a % b ); }
int lcm( int a, int b ){ return a * ( b / gcd( a, b ) ); }
//int toi( string a ){ int ans;  sscanf(a.c_str(),"%d",&ans);  return ans;  }
//string tos( int a ){ ostringstream st; st<<a; string ans = st.str(); return ans; }

#define FOR(i,a,b) for(int i=(a), _b=(b);i<=_b;i++)
#define DOW(i,b,a) for(int i=(b), _a=(a);i>=_a;i--)
#define REP(i,n) FOR(i,0,(n)-1)
#define DEP(i,n) DOW(i,(n)-1,0)
#define mem(A,x) memset(A, x, sizeof A)
#define pb push_back
#define all(A) A.begin(),A.end()
#define sci(x) scanf("%d",&x)
#define scs(x) gets(x);

int cx[] = { -1, 1,  0, 0,     1, 1, -1, -1 };
int cy[] = {  0, 0, -1, 1,     -1, 1, -1,  1 };

//ios::sync_with_stdio(0);

int main()
{
 ll n;
 cin >> n;
 cout << ( ( n & 1 ) ? (-1)*( (n >> 1) + 1 ) : n >> 1 )<< endl;
 return 0;
}

// 1474651492078

#include<bits/stdc++.h>

using namespace std;

int main()

{

	long long n;

	while(scanf("%I64d",&n)==1)

	{

		if(n%2==0) printf("%I64d\n",n/2);

		else printf("%I64d\n",-(n+1)/2);

	}

	return 0;

}

#include<iostream>
using namespace std;
int main()
{
long long int n;
	cin>>n;
	if(n%2==0)
	{
	cout<<(n/2);
	}
	if (n%2!=0)
		{
	cout<<(-1*(n+1)/2);
		 }

return 0;
}

#include<iostream>
using namespace std;
int main() {

	long long n;
	cin >> n;

	if (n % 2 == 0)cout << n / 2;
	else cout << (n - 1) / 2 - n;

	return 0;
}

#include <iostream>
#include <math.h>
#include<cmath>
using namespace std ;

int main ()
{
	double n(0) ;
	int long long s(0);
	cin>>n ;

	double intpart, fractpart;
	fractpart = modf((n/2), &intpart);

	//cout<<fractpart <<endl ;

	if (fractpart<0.5)
	{
		s=pow(-1,n)*(n/2);
	}
	else
	{
		s=pow(-1,n)*((n/2)+1);
	}
	cout<<s;

	return 0 ;
}

#include <stdio.h>

int main() {
    long long unsigned int n;
    scanf("%lld",&n);
    if(n%2 == 0) {
        printf("%lld\n",n/2);
    }else{
        printf("-%lld\n",(n+1)/2);
    }

    return 0;
}

// 1474652621375

#include<iostream>
using namespace std;
int main(){
    long long n,a,b;
    cin>>n;
    if(n%2==0){
        a = n/2;
        cout<<a;
    }
    else{
        b = (n+1)/2;
        cout<<-b;
    }
}

#include<bits/stdc++.h>
using namespace std;
int main(){
long long x,y;
cin>>x;
y=-ceil(x/2.0);
if(x%2==0) cout<<(x/2)<<endl;
else cout<<y<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
if(n%2==0)
cout<<n/2;
else
cout<<-(n+1)/2;
}

#include <iostream>
using namespace std;
int main() {
long long w;
cin>>w;
if(w%2==0)
cout<<w/2;
else
cout<<(w/2+1)*-1;

return 0;
}

#include <cmath>
#include<algorithm>
#include <iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main(){
  long long n;
  cin >> n;
  if(n%2==0){
    cout << n/2;
  }
  else{
    cout << -(n+1)/2;
  }
}

#include <bits/stdc++.h>

#define mp make_pair
#define pb push_back
#define FILE "run"
#define all(x) (x).begin(), (x).end()

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

int main()
{
    long long n;
    cin >> n;
    if (n % 2 == 0)
        cout << n / 2;
    else
        cout << (n - 1) / 2 - n;
    return 0;
}

#include <iostream>

using namespace std;

long long f(long long n) {
   if (n % 2 == 1) {
        return f(n-1) - n;
    } else {
        return n/2;
    }
}
int main() {
    long long n;
    cin >> n;
    cout << f(n);
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long n;
    cin>>n;
    long long sum=0;
    if(n%2==0)cout<<n/2;
    else cout<<-(n+1)/2;
    return 0;
}

#include <iostream>
#include <cstdio>
#define LL long long

using namespace std;

int main(){
	LL n;
	int sign = 1;
	//freopen("input.txt", "r", stdin);
	cin >> n;
	if(n % 2)
		sign = -1;
	cout << n / 2 + (n % 2) * n * sign;
	return 0;
}

#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<bits/stdc++.h>
#include<cctype>
#include<cmath>
#include<algorithm>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
using namespace std;
#define EPS 1e-9
#define MAX 10000001
#define pb push_back
#define mp make_pair
#define ins insert
#define fi first
#define se second
#define pi acos(-1.0)
#define mod 100000007
#define inf 2147483647
#define ll long long int
#define sss stringstream
#define oss ostringstream
#define iss istringstream
#define llu long long unsigned
#define _sq(a) (a)*(a)
#define sz(a) ((int)a.size())
#define gcd(a,b)    (a,b)__gcd
#define lcm(a,b) ((a)*((b)/gcd(a,b)))
#define _max3(a,b,c) max(a, max(b,c))
#define _min3(a,b,c) min(a, min(b,c))
#define FOR(i, n) for(i=0; i<(int)n; i++)
#define FOR1(i, n) for(i=1; i<=(int)n; i++)
#define mem(a) memset(a, 0, sizeof(a))
#define _set(a) memset(a,-1,sizeof(a))
#define FORI(i, a, b) for(i=a; i>=(int)b; i--)
#define FORab(i, a, b) for(i=a; i<=(int)b; i++)
#define popcount(n) __builtin_popcount(n)
#define popcountl(n) __builtin_popcountll(n)
#define sort_rev(a) sort(a.rbegin(), a.rend())
#define sort_all(a) sort(a.begin(), a.end())
#define dis_twopoints(x1,y1,x2,y2) sqrt(_sq(x1-x2) + _sq(y1-y2))
#define foreach(i,n) for(__typeof((n).begin())i =(n).begin();i!=(n).end();i++)
#define check(mask, k) (mask & (1 << k))
#define set1(mask, k) (mask | (1 << k))
#define set0(mask ,k) (mask & (~(1<<k)))
#define SD(a) scanf("%d",&a)
#define SLF(a) scanf("%lf",&a)
#define SC(a) scanf("%c",&a)
#define SS(a) scanf("%s",a)
#define SLLD(a) scanf("%lld", &a)
#define Si64(a) scanf("%I64d", &a)
#define READ(f) freopen(f, "r", stdin)
#define WRITE(f) freopen(f, "w", stdout)

int main()
{
    unsigned long long int n;
    cin>>n;
    if(n%2==0)
    cout<<n/2<<endl;
    else
    cout<<"-"<<(n/2+1)<<endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
 long long int n;
 cin>>n;
 if(n%2==0)
    cout<<n/2;
 else
 cout<<-(n+1)/2;
}

#include <iostream>
using namespace std;
int main()
{
    long long n , s1=0 , s2=0 ;
    cin>>n;
        if(n%2==0)
            cout<<n/2<<endl;
        else
            cout<<-(n+1)/2<<endl;
}

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<queue>
#include<map>
#include<bitset>
using namespace std;
#define PII pair<int,int>
#define X first
#define Y second
#define PB push_back
#define CLR(a) memset(a, 0, sizeof(a))
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FOE(i,a,b) for (int i=(a);i<=(b);i++)
#define FIT(i,a) for (__typeof__((a).begin()) i = (a).begin(); i != (a).end(); i++)
#define TRA(i,a,b) for (int i = (a); i != -1; i = (b)[i])
#define INF (1 << 30)
#define EPS (1e-9)
#define REP(i,n) FOR(i,0,n)
#define LL long long

LL n, ans;
int main(){
        cin >> n;
        if (n&1) ans = -n/2 - 1;
        else ans = n/2;
        cout << ans << '\n';
        return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long x;
    cin>>x;
    if(x%2==0)
    {
        cout<<x/2<<endl;
    }
    else
    {
        cout<<((x/2)+1)*-1<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	long long n;
	cin >> n;
	if (n%2==0){
		cout << n/2;
	}

	else{
		cout << (-1)*(n/2+1) << '\n';
	}
	return 0;
}
// 1521959591554

#include <iostream>

using namespace std;

int main()
{
    long long int n;
    cin >> n;
    if(n%2 == 0)
        cout << n/2;
    else
        cout << n/2 - n;
}

#include <iostream>
#include <math.h>
using namespace std;

int main()
{
    long long int f=0, n;
    cin >> n;
    if((n%2)==0)
        f = n/2;
    else
        f = -1*ceil(double(n)/2);
    cout << f;
    return 0;
}

#include <iostream>
#include<iomanip>
using namespace std;
long double f(long long int n);
int main()
{
	long long int num;
	cin >> num;
	cout <<fixed<<setprecision(0)<<f(num) << endl;;
	return 0;
}
long double f(long long int n)
{
	if (n%2==0)
	return (n/2);
	else
	{
		n = n + 1;
		n = n / 2;
		n = n*-1;
		return n;
	}
}

#include<bits/stdc++.h>
using namespace std;
main (){
long long a,b,c,d,f;
cin>>a;
if(a%2==0){d=a/2;}
else{d=a/2-a;}

cout<<d;

}

#include<iostream>
using namespace std;
int main()
{
    long long n,i;
    cin>>n;
    if(n%2==0)
        cout<<n/2;
    else
        cout<<-n/2-1;
    return 0;
}

#include <iostream>
using namespace std;

int main()
{
   long long x , z;
cin>>x;
if(x%2==0)
z=(x/2);
else
{
z=-((x-1)/2+1);

}
cout<<z<<"\n";
    return 0;
}

#include "iostream"
using namespace std;
int main(int argc, char *argv[])
{
  long long n;
  cin>>n;
  if(n%2-1)cout<<n/2;
  if(n%2)cout<<-(n+1)/2;
  return 0;
}

#include<iostream>
#include<cmath>
using namespace std;
int main() {
	long long n;
	cin >> n;
	long long res;
	if (n % 2 == 0) {
		res = n / 2;
	}
	else
		res = -ceil((long double)n / 2);
	cout << res << endl;
	return 0;
}

#include<bits/stdc++.h>
int main()
{
	long long int a,b;
	scanf("%lld",&a);
	b=a/2;
	if(a%2==1)
	b=-b-1;
	printf("%lld\n",b);
}
// 1461354502186

#include <iostream>
using namespace std;
int main() {
  int long long n;
  cin>>n;

    if(n%2==0)
      cout<<n/2;
    else
      cout<<(n/2-n);
  }

#include <bits/stdc++.h>

using namespace std;

const int modo=10000007,LL=1e-9;

int main()
{
    ios_base::sync_with_stdio(0);
     long long int n;
    cin>>n;
    if(n%2!=0)
    {
         long long int odd=n/2+1;
        long long int even=n/2;
        cout<<( long long int)(even*(even+1))-(long long int)(odd*odd)<<endl;
    }
    else
    {long long int odd=n/2;
         long long int even=n/2;
        cout<<( long long int)(even*(even+1))-( long long int)(odd*odd)<<endl;}

}

#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main() {

    unsigned long long n; cin >> n;

    long long  sum1 = ((2 * 2 + 2 * ((n / 2) - 1)) * (n / 2)) / 2;
    long long  sum2 = ((2 + 2 * (((n + 1) / 2) - 1)) * ((n + 1) / 2)) / 2;

    cout << sum1 - sum2 << endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,b;
    cin>>n;
    if(n%2==0)
    {
        n/=2;
        cout<<n<<endl;
    }
    else
    {
        b=((n/2)+1)*(-1);
        cout<<b<<endl;
    }

    return 0;
}

#include <iostream>
using namespace std;
int main()
{
	int long long a=0;
	cin>>a;
		if (a%2==0)
		cout<<a/2;
		else if(a%2!=0)
		cout<<((a-1)/2)-a;
}

#include <iostream>
#include <stdio.h>
#include <fstream>
#include <string>

using namespace std;

long main() {
	long long n, a=0;
	cin >> n;

	if (n % 2 == 0)
	{
		cout << n / 2;
	}
	else
		cout << -(n + 1) / 2;

}

#include <iostream>
#include <cmath>

using namespace std;

int main(){
     long long int n;
     cin >> n;
     long long int temp = (n%2 == 0 ? n/2 : -ceil(n/2.0));
     cout << temp;
     return 0;
}

#include <bits/stdc++.h>

using namespace std;
#define f(a,b,c) for(int a = b, _ = c; a < _; a++)
#define pb push_back
#define pp pop_back
#define mp make_pair
#define fs first
#define sc second
#define pii pair<int, int>
#define dbg(x) cerr << #x << " >>>> " << x << '\n';
typedef long long int lli;
const int INF = 0x3f3f3f3f;
const lli MOD = 1e9 + 7;
const int MAX = 1e6;

int main(){
#ifdef LOCAL_DEFINE
  freopen("input.txt", "rt", stdin);
#endif
  lli n, ans;
  cin >> n;
  if ( n%2 == 0 ){
    ans = n/2;
  }
  else{
    ans = n/2 - n;
  }
  cout << ans;
  return 0;
}

// 1504894015440

#include <iostream>
using namespace std;
int main(){
	long long x;
	cin >> x;
	if (x % 2 == 0)
		x = x / 2;
	else
		x = -1 * (x / 2 + 1);
	cout  <<x;
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
long long x ;
cin>>x;

if(x%2!=0)
x=-((x+1)/2);
else
x=x/2;
cout<<x;

return 0;
}

#include <iostream>
using namespace std;
void main()
{
long long n;
cin>>n;
if(n%2==0)
cout<<n/2;
else cout<<(n/2)-n;
}

#include <bits/stdc++.h>
#define fr(a, b, c) for(int a = b, __= c; a < __; a++)
#define pq priority_queue
#define pb push_back
#define len length
#define X first
#define Y second

using namespace std;

typedef long long ll;
typedef long long unsigned llu;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

ll gcd(ll a, ll b) {return (!a) ? b : (b%a, a);}
ll teto(ll a, ll b) {return (a%b) ? ((a/b) + 1) : (a/b);}

ll resp;

main() {
	ios::sync_with_stdio(0);
	ll n;
	cin >> n;
	if(n%2) cout << -teto(n, 2) << endl;
	else cout << teto(n, 2) << endl;
}

// 1504894130814

// D. Calculating Function

#include <iostream>

using namespace std;

int main(){
  long long n;
  cin >> n;

  if(n % 2 == 0)
    cout << n / 2 << "\n";
  else
    cout << n / 2 - n << "\n";

  return 0;
}

// 1474651420005

#include <iostream>
using namespace std;

int main()
{
	long long int n;
	cin >> n;

	if (n % 2 == 0)
	{
		cout << n / 2;

	}
	else
	{
		cout << (n + 1) / 2 * -1;
	}

}

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    long long int n;
    cin >> n;
    long long int s = n%2==0 ? n/2 : -1*(n/2+1);
    cout << s << endl;
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n,ans;
    scanf("%lld",&n);
    if(n%2==0){
        ans=n/2;
    }
    if(n%2==1){
        ans=(n-1)/2-n;
    }
    printf("%lld\n",ans);
    return 0;
}

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	long long int n;
	cin>>n;
	if(n%2==0)
	cout<<n/2<<endl;
	else
	cout<<-1*(n-1)/2-1<<endl;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long int n;

    cin >> n;

    long long int sum = n % 2 == 0 ? n / 2 : -(n+1) / 2;

    cout << sum;
}

#include<bits/stdc++.h>
using namespace std;
long long n;
int main(){
	cin >> n;
	if(n%2==0){
		cout << n/2;
	}else{
		cout << n/2-n;
	}
	return 0;
}

#include <iostream>
using namespace std;

int main()
{
    long long int n, t ,i = 0;

    cin>>n;

    if(n%2 == 0)
    {
        t = n /2;
    }else{
        i = (n-1)/2;
        t = i-n;
    }

    cout<<t<<endl;

    return 0;
}

// 1475955045603

#include <stdio.h>

int main(){

	long long n;

	scanf("%I64d",&n);

	if(n % 2 == 0){
		printf("%I64d\n",n/2);
	}else{
		printf("%I64d\n", -1 * ((n+1)/2) );
	}

	return 0;
}

#include <iostream>
#include <cmath>
using namespace std ;
int main (){
 long long n ;
 cin >> n  ;
if ( n %2 ==0)
{
  n = n/2 ;
 cout << n ;
}
else if ( n%2!=0)
{
  n=(-1*(n+1)/2 ) ;
  cout << n ;
}

return 0;

}

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
if(n%2)
cout<<n/2-n<<endl;
else
cout<<n/2<<endl;
return 0;
}

#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
#include <unordered_map>

using namespace std;

void solve() {
	int n;
	cin>>n;

	int d = 1;
	if (n%2!=0){
		d= -1;
	}

	cout << fixed << ceil(n/2.0)*d;
}

/*
int main() {
	int t;
	cin >> t;

	while (t--) {
		solve();
	}

	return 0;
}
*/

int main() {
	solve();

	return 0;
}

#include <iostream>
#include <string>
#include <math.h>

using namespace std;
int main()
{
	int n;
	cin >> n;
	if (n % 2 == 0)
		cout << n / 2;
	else
		cout << n / 2 - n;
}

#include <iostream>

using namespace std;

int main()
{
    long long n;
    cin>>n;
    long long sum=0;
    double a,b;
    double k1,k2;
    switch(n%4)
    {
        case 0: k1=n/2; k2=n/2; break;
        case 1: k1=n/2+1; k2=n/2; break;
        case 2: k1=n/2; k2=n/2; break;
        case 3: k1=n/2+1; k2=n/2; break;

    }
    a=-k1/2*(2+2*(k1-1));
    b=k2/2*(4+2*(k2-1));
    sum=a+b;
    cout<<k1<<" "<<k2<<" "<<a<<" "<<b<<" "<<sum;
    return 0;
}

#include<iostream>
using namespace std;

int sum(int n,int f){
if(n==0)
return f;
if(n%2==0) return sum(n-1,f+n);
else return sum(n-1,f-n);

}

int main(){
long n;cin>>n;
int f=0;
cout<<sum(n,f)<<endl;
return 0;
}

#include <iostream>

using namespace std;
int main(int argc, char *argv[]) {
	int ans = 0,n=0;

	cin >> n;

	if(n%2 ==0){
		ans = n/2;
	}else{
		ans = 0-(n/2)+1;
	}
	cout << ans;
}

#include <iostream>

using namespace std;

int main()
{
    int n,d=0;
  cin>>n;
  if(n%2==0)
  {
    d+=(n/2);
    cout<<d;
  }
  if(n%2==1)
  {
      d-=(n/-2)+-1;
      cout<<-d;
  }

    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;

int main(){

    long int n, m = 0, l;

    cin >> n;

    while (n >= 1){

        if (n % 2 == 0){
            l = 1;
        } else {
            l = -1;
        }

        m = m + l * n;
        n--;
    }

    cout << m;
}

#include<iostream>
using namespace std;
int main() {
  int n, ans = 0;
  cin >> n;
  for (int i = 0; i < n + 1; i++) {
    ans += i * ((n % 2) * - 1);
  }
  cout << ans;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
int n;
int main()
{
	cin>>n;
	if(n%2==0) cout<<(n/2);
	if(n%2==1){
		cout<<n/2-n;
	}
	return 0;
 }

#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
int sum=0;
long long s=(1+n)*n/2;
for(int i=1;i<=n;i+=2) sum+=i;
cout<<s-(sum*2);
}

#include <iostream>
using namespace std;
int main() {
	int n, sum=0;
	cin >> n;
	if (n % 2 == 0) {
		cout << n / 2;
	}
	else {
		cout << (n-1)/ 2 + n*(-1);
	}
}

#include <iostream>
using namespace std;

int main()
{
int n,f(0);
cin >> n;

for(int i(1);i<=n;i++)
{
	if(i & 1)
   f-=i;
	else
	f+=i;
}
cout << f;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{

	long long count;
	cin >> count;
	long double  s1, s2, sum = 0;
	if (count % 2 == 0)
	{

			s2 = count / 2;
			s1 = (count / 2) ;

			sum += s2*(2 + count) / 2;
		    sum += -1 * (s1*(1 + count - 1) / 2);

	}
	else
	{

			s1 = (count / 2) + 1;
			sum += -1 * (s1*(1 + count ) / 2);
			s2 = count / 2;
			sum += s2*(2 + count-1) / 2;
	}

	cout << sum;
		return 0;
}

/*
 *  Created on: 11 / 3 / 2020
 *  Author:		Eslam Waheed
 */
#include <bits/stdc++.h>
using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define __USE_MINGW_ANSI_STDIO
#define Eslam__Waheed ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL);

#define ll   long long
#define ull  unsigned ll
#define dd   double
#define ld   long dd
#define ss   string

#define pb      push_back
#define all(c)  c.begin(), c.end()
#define rall(c) c.rbegin(), c.rend()
#define stp(n)  cout << fixed << setprecision(n)
#define iq(v)   v.resize(unique(v.begin(),v.end())-v.begin())
#define sz(s)   s.size()
#define endl    '\n'

#define sf(x)			scanf("%d", &x)
#define sf2(x,y)		scanf("%d %d", &x, &y)
#define sf3(x,y,z)		scanf("%d %d %d", &x, &y, &z)
#define sfll(x)			scanf("%I64d", &x)
#define sfll2(x,y)		scanf("%I64d %I64d", &x, &y)
#define sfll3(x,y,z)	scanf("%I64d %I64d %I64d", &x, &y, &z)

#define loop(i,m,n)  for(ll i=m;i<n;i++)
#define rloop(i,n,m) for(ll i=n;i>=m;i--)
#define for2(i,m,n)  for(ll i=m;i<=n;i++)

ll gcd(ll a, ll b) { return !b ? abs(a) : gcd(b, a % b); }
ll lcm(ll a, ll b) { return abs(a / gcd(a, b)) * b; }

//const ld pi = 3.14159265359;
//const ld PI = 3.14159265358979323846;
//const ll mod = 1e9 + 7;
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
/*
 you can ^_^ (•‿•)

( إن الله وملائكته يصلون على النبي يا أيها الذين آمنوا صلوا عليه وسلموا تسليما )
*/
int main()
{
    //stp(0);
    Eslam__Waheed
    ll n; cin >> n;
    ll even = 0, odd = 0;
    if (n & 1)
    {
        even -= (n / 2);
    }
    else
    {
        odd -= (n / 2);
    }
    even += n * (n + 2) / 4;
    odd += (n + 1) * (n + 1) / 4;
    ll ans = even - odd;
    cout << ans;
}

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
	unsigned long long int n,s=0,x;
	cin>>n;
	for(unsigned long long int i=1;i<=n;i++)
	{
		x=pow(-1,i);
		s+=x*i;
	}
	cout<<s;
	return 0;
}

#include<iostream>
using namespace std;
int main () {

 long long a,x;
 long long y;
cin >> a ;
x=  (a*(a+1)/2);
y=		2*((a+1)/2)*((a+1)/2);
long long z=x-y;
cout << z;
    return 0;
}

#include <iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	int sign = -1;
	int ans = 0;
	int a;
	for (int i = 1; i <= n; i++)
	{
		a = i;
		a *= sign;
		ans += a;
		sign = -sign;
	}
	cout << ans;
}

#include <iostream>

int f_func(int num);

int main() {

    int n{};
    int result{};
    std::cin >> n;
    std::cout << f_func(n) << std::endl;
    return 0;
}

int f_func(int num) {
    if (num % 2 == 0)
        return num / 2;
    else {
        num = num / 2;
        return ++num;
    }
}

#include<iostream>
using namespace std;

int main()
{
	long int n;
	cin>>n;
	int f=0, s=0;

	f = -1*n*(n+1)/2;

	if(n%2)
		n--;

	s = 4*(n+2)*n/8;
	cout<<f+s;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
int main(){
	double n;
	cin>>n;
	if(fmod(n,2)==0){
		cout<<n/2;
	}
	else{
		cout<<(n-1)/2-n;
	}

}

#include <iostream>
#include "math.h"
using namespace std;

int main(){
    long long int inputNum,sum1=0,sum2=0;
    cin >> inputNum;
    if (inputNum % 2 == 0) {
        inputNum /= 2;
        sum1 = -(inputNum*inputNum);
        sum2 = inputNum*inputNum + inputNum;
    }else{
        inputNum /= 2;
        sum2 = inputNum*inputNum + inputNum;

        inputNum = (inputNum*inputNum)+1;
        inputNum = (inputNum / 2)+1;
        sum1 = -(inputNum*inputNum);
    }
    cout << sum1 + sum2;
}

#include <iostream>
#include <cmath>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    unsigned int p;
    if(n % 2 == 1){
        p = -(n+1)/2;
    }
    else{
        p = n/2;
    }
    cout<<p;

    return 0;
}

#include <iostream>
#include <vector>
#include <numeric>
#include <climits>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>

/*
    メモ
    #inlucde <string>
    memset(配列,初期化値,sizeof(配列));//配列初期化

    #include <queue>
    push(),back(),front()
    pop()//最初の要素削除

    #inclue <stack>
    pop(),push(),top(),empty()

    __builtin_popcount(unsigned int);

*/

#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define dump(a) (cerr << #a << "=" << (a) << endl)
#define DUMP(list) cout << "{"; for(auto nth : list){ cout << nth << " ";}cout << "}" << endl;

using namespace std;

int main() {

        int n;
        cin >> n;

        int ans=0;

            if(n%2==1){
                ans-=((n/2)+1);
            }else{
                ans=n/2;
            }

        cout << ans << endl;
}

#include<iostream>
using namespace std;
int main ()
{
int n, m ;
cin>>n;
if(n%2==0)
cout<<n*0.5;
else
{
m=(n-1) *0.5-n;
cout << m ;
}
return 0;
}

#include <iostream>
using namespace std;

int main() {

	int n, m = 1, s = 0;
	cin >> n;

	for (int k = 1; k <= n; k++) {
		m *= -1;
		s += m*k;
	}

	cout << s;
	return 0;
}

#include <iostream>
#include <string>
#include<algorithm>
#include<cstdio>
using namespace std;

void main()

{
//486A
	double n;
	cin >> n;
	if (n < 2147483647)
	{
		int b = (int)n;
		if (b % 2 == 0)
			b = n - (b / 2);
		else
			b = (b / 2) - n;
		cout << b;
	}
	else {
	int b = (int)n;
	if (b % 2 == 0)
		n = n - (n / 2);
	else
		n = (n / 2) - n;
	printf("%.0f", n);
}

}

#include<iostream>
using namespace std;
int main()
{
    long long int n,ans,pos=0,neg=0;
	long long  p,q; //p--> odd & q-->even
	cin>>n;
	if(n%2==1)
	{
		p=(n/2)+1;
		q=(n/2);
	}
	else
	{
		p=n/2;
		q=n/2;
	}
	pos=((q)*(2*2 + (q-1)*2))/2;
	neg=((p)*(2*-1+(p-1)*-2))/2;
	ans = pos+neg;
	cout<<ans<<endl;
    return 0;
}

#include <bits\stdc++.h>

using namespace std;

int main() {
	int n;
	cin >> n;
	int a = 0;
	if (n % 2 == 0) {
		a = n / 2;
	}
	else {
		a = -(n + 1) / 2;

	}
	cout << a;
}

#include<iostream>

using namespace std;

int cal(long long int w)
{
    static int m=0;
    if(w==0)
        return 0;
    if(w%2 != 0)
        m=-w;
    else
        m =w;
    return m + cal(w-1);
}
int main()
{
    long long int w;
    cin >> w;
    cal(w);
    cout << cal(w) << endl;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
	long long int s;
	cin>>s;
	if(s%2==0) cout<<s/2-s;
	else cout<<s/2;
}

#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main(){
	int a,P=0;cin>>a;
	for(int i=1;i<=a;i++)
	{
		if(i%2==0)
		{
			P=P+(i*-1);
		}
		else
		{
			P=P+(i);
		}

	}
	cout<<P;
}

#include <iostream>

using namespace std ;

        int sum ;

int main(){

    long long n ;

    for(int i  = 1 ; i <= n ; i++){
        if(i % 2 == 0)
        sum -= i;
        else sum += i ;
    }
            cout << sum ;
    return 0 ;
}

#include<iostream>
using namespace std;
int main()
{
	int n,sum=0;
	cin>>n;
	if(n%2==0)
	{
		sum=n/2;
	}
	else
	{
		sum=(n-1)/2-n;
	}
	cout<<sum;
	return 0;
}

#include<iostream>
using namespace std;

int main()
{
	int n,x,y,se=0,so=0,s=0;

	cin>>n;

	if((n%2)==0)
	{
		x=n/2;
		y=(n/2)-1;
		se=x*(x+1);
		so=(y+1)*(y+1);
		s=se-so;
	}

	else
	{
		x=y=n/2;
		se=x*(x+1);
		so=(y+1)*(y+1);
		s=se-so;
	}

	cout<<s;

	return 0;
}

#include<iostream>
using namespace std;
int main()
{int n;cin>>n;int *k;k=new int [n];int t=1;for(int i=0;i<n;i++){if(i%2==0){k[i]=-t;}else{k[i]=t;}t++;}int res;for(int i=0;i<n;i++){res+=k[i];} cout<<res; return 0;}

#include<bits/stdc++.h>
#include<math.h>

using namespace std;
int main()
  { long g=0;
    long  n,h=0;
     cin>>n;
     int f=(n/2);
     if(n%2!=0)
     { g=f+1;
       h=(-1*g);
       cout<<h;
      }
     else
      cout<<f;

       return 0;
  }

#include<bits/stdc++.h>

using namespace std;

#define NN=100010

int main() {

	int n;

	scanf("%d",&n);

	if(n%2==0) printf("%d",n/2);

	else printf("%d",(n-1)/2-n);

}

    #include<iostream>
    #include<cstdio>
    using namespace std ;
    int main()
    {
        int n;
        cin>>n;

         if(n%2==0)
        cout<<n/2;
        else

            cout<<(n-1/2)-n;

    }

#include <iostream>
#include <cmath>
using namespace std;

int main(){

    long int n, m = 0, l;

    cin >> n;

    while (n >= 1){

        if (n % 2 == 0){
            l = 1;
        } else {
            l = -1;
        }

        m = m + l * n;
        n--;
    }

    cout << m;
}

#include <iostream>
#include<cmath>
using namespace std;
void calculatingFunction();
int main() {
	calculatingFunction();
	return 0;
}

void calculatingFunction(){
	long long n;
	cin>>n;

	cout<<(n+1)/2*pow(-1,n%2);
}

#include<iostream>
#include<cstdlib>
using namespace std;
main()
{
  long   int n,i,j;
     cin>>n;
     if(n%2==0)
     cout<<n/2;
     else
     cout<<"-"<<(n+1)/2;
     return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long int n,sum1,sum2;
    cin>>n;
    sum1=(n*(n+1))/2;
    sum2=pow(n,2);
    cout<<sum1-sum2;
    return 0;
}

#include <iostream>
using namespace std;
int main() {
	long long n;
	cin >> n;
	if(n % 2 == 0) {
		long long s = n/2;
		cout << s << endl;
	} else {
		int s = (n-1)/2-n;
		cout << s << endl;
	}
	return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define f(i,a,b) for(i=a;i<b;i++)
#define g(i,a,b) for(i=a;i<=b;i++)
#define h(i,a,b) for(i=a;i>=b;i--)
#define Int_max 500000000000
using namespace std;

int main()
    {
        ll n,sum=0;
        cin>>n;
  ll  sumeven,totalsum,ans;
       n=n%10000000000000000;
    totalsum= (n*(n+1))/2;

     n=n/2;
    sumeven= n*(n+1);
    ans= 2*sumeven-totalsum;
    cout<<ans<<endl;

    }

#include <iostream>
#include <string>
using namespace std;
void main()
{
	long n;
	cin >> n;
	++n;
	long f = 0;
	long one = 1;
	for(int i = 1;i < n;i++)
	{
		one = -one;
		f += one * i;
	}
	cout << f;
}

#include <iostream>
using namespace std;

int main() {
	int n,count,count1;
	cin>>n;
	count=-(n*(n+1))/2;
	if(n%2==0)
	{
		count1=2*2*((n/2)*((n/2)+1)/2);
	}
	else
	{
	count1=((n-1)/2)*(n+1);
	}
	cout<<count+count1;
	return 0;
}

#include <iostream>
using namespace std;

int main(){
    int n = 0;

    cin >> n;

    int total = 0;

    if(n % 2 == 0){
        cout << n / 2 << endl;
    } else {
        cout << (n + 1) / 2 * -1 << endl;
    }

    return 0;
}

// 1475954450358

#include<iostream>
using namespace std;
int main(){
      int n;
      scanf("%lld",&n);
     /*for(int i=1;i<=n;i++){
          if(i%2==1){
               sum=-i;
               res=res+sum;
               //cout<<sum; /*beocs of loop time liit exceed
          }
          else{
               res=res+i;
          }
     }
     printf("%d",res);*/
     cout<<((n%2==0)?n/2:(n-2+1)/-2);

}

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
    int n,i,a=0,x=0;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>a;
        x=x+(a*pow(-1,i));
    }
    cout<<x;
    return 0;
}

#include <iostream>
#include<cmath>
using namespace std;

int main() {
	// your code goes here
	unsigned long long n,i,even=0,odd=0,sum=0;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		if(i%2==0)
		{
			even=even+i;
		}
		else
		{
			odd=odd-i;
		}
	}
	sum=odd+even;
	cout<<sum;

	return 0;
}

#include <iostream>
#include <math.h>
using namespace std;

int main()
{
     long int n;
     cin>>n;

        if(n%2==0)
        {
           cout<<n/2;
        }
        else
        {
            cout<<(n/2)-n;
        }

    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
    unsigned int n;
    int result;
    cin >> n;

    if(n%2 == 0)
    {
        result = n/2;

    }
    else
    {
        result = (-(n+1))/2;

    }
    cout << result << endl;

    return 0;
}

#include<iostream>
using namespace std;
int main()
{
   int a,m;
   cin>>a;
   if(a%2==0)
   {
      cout<<a/2;
   }
   else
   {
      m=-(a/2+1);
      cout<<m;
   }
}

#include<iostream>

using namespace std;

int main()
{
	int n;
	cin >> n;
	if (n % 2 == 0)
		cout << (n / 2) << endl;
	else
		cout << (( n - 1 ) / 2 - n) << endl;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{

	long long count;
	cin >> count;
	long long   s1=0,s2=0, sum = 0;
	unsigned long long S1=0, S2=0, Sum = 0;
	if (count <1000000000)
	{

	if (count % 2 == 0)
	{

			s2 = count / 2;
			s1 = (count / 2) ;

			sum += s2*(2 + count) / 2;
		    sum += -1 * (s1*(1 + count - 1) / 2);

	}
	else
	{

			s1 = (count / 2) + 1;
			sum += -1 * (s1*(1 + count ) / 2);
			s2 = count / 2;
			sum += s2*(2 + count-1) / 2;
	}

	cout << sum;
	}
	else
	{
		if (count % 2 == 0)
		{

			S2 = count / 2;
			S1 = (count / 2);

			Sum += S2*(2 + count) / 2;
			Sum += -1 * (S1*(1 + count - 1) / 2);

		}
		else
		{

			S1 = (count / 2) + 1;
			Sum += -1 * (S1*(1 + count) / 2);
			S2 = count / 2;
			Sum += s2*(2 + count - 1) / 2;
		}
		cout << Sum;

	}
		return 0;
}

#include <iostream>

using namespace std ;

        int sum ;

int main(){

    long long n ;

    cin >> n ;
            cout << (n*(n - 1))/2 - n << endl ;
    return 0 ;
}

   #include<bits/stdc++.h>
   using namespace std;
   int main()
   {
   ios::sync_with_stdio(0);
   cin.tie(0);

    long long int n;
    cin>>n;
    int even,odd;
    even=n/2;
    if(n%2==0)
    	odd=n/2;
    else
    	odd=(n/2)+1;

    long long int o,e;
    e=(even*(even+1));
    o=(odd*odd);
   long long int  total=(e-o);
    cout<<total;

   return 0;
   }

#include <iostream>
#include <string>

int main(int , char *[]){
	long input;
	std::cin >> input;
	long out = input/2;
	if(input%2 != 0) out -= input;
	std::cout << out;
	return 0;

}

#include <iostream>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int x = 0;

        if (n % 2 == 0){
            x = n / 2;
        }else{
        x = n + 1;
        x = x * -0.5;
        }

  cout << x;
    return 0;
}

#include<bits/stdc++.h>
#define x first
#define y second
#pragma GCC optimize(2)
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC optimize(3)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC target("sse3","sse2","sse")
#pragma GCC target("avx","sse4","sse4.1","sse4.2","ssse3")
#pragma GCC target("f16c")
#pragma GCC optimize("inline","fast-math","unroll-loops","no-stack-protector")
#pragma GCC diagnostic error "-fwhole-program"
#pragma GCC diagnostic error "-fcse-skip-blocks"
#pragma GCC diagnostic error "-funsafe-loop-optimizations"
#pragma GCC diagnostic error "-std=c++14"
#define IOS ios::sync_with_stdio(false);cin.tie(0);
using namespace std;
typedef unsigned long long ULL;
typedef pair<int,int> PII;
typedef long long LL;
const int N=105;
const int INF=0x3f3f3f3f;
const int MOD=998244353;
int a[N];
int main(){
    IOS;
    LL n;cin>>n;
    LL ans=0;
    LL t=n/2;
    if(n&1){
        ans+=(-1-n)*(t+1)/2;
        ans+=(2+n-1)*t/2;
    }else{
        ans+=(2+n)*t/2;
        ans+=-n*t/2;
    }
    cout<<ans<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mod 1e9+7
#define all(x) x.begin(),x.end()
void solve() {
ll n,sodd,seven;
cin>>n;
if(n==1)
 {cout<<-1*n;
 }
else if(n%2==0&&n>1)
{sodd=-1*(n/2)*((1+n-1)/2);
 seven=((n/2)/2)*(2+n);}

 else
{sodd=-1*(((n/2)+1))*((1+n)/2);
 seven=((n/2)/2)*(2+n-1);}
cout<<sodd+seven;

}

int main() {
	ios_base::sync_with_stdio(false);
	cout.tie(0); cin.tie(0);

		solve();

}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int s=0,t=1;
    int i,n;
    cin>>n;
    t=n/2;
    if(n%2==0)
     {
       s=-t;
     }
     else
     {
         s=-t+n;
     }
    return 0;
}

#include <stdio.h>

int main() {
	long long n;
	scanf("%llu", &n);

	long long plus, minus, ans;
	if (n % 2 == 0) {
		plus = (n / 4) * (2 + n);
		minus = (n / 4) * (1 + (n - 1));
	}
	else if (n == 1) {
		plus = 0;
		minus = 1;
	}
	else {
		plus = ((n / 2) / 2) * (2 + (n - 1));
		minus = (((n / 2) + 1) * (1 + n)) / 2;
	}
	printf("%lli %lli   ", plus, minus);
	ans = plus - minus;

	printf("%lli", ans);
}

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
   long int x,tot=0;
   scanf("%d", &x);
   if (x%2!=0)tot=-(x+1)/2;
   if (x%2==0)tot=x/2;
   printf("%d\n", tot);
    return 0;
}

// 1519488065653

#include <iostream>

using namespace std;

int main()
{
    long long n;
    cin >> n;

    int R = 0;

    if (n % 2 == 0)
    {
        R = R + 0.5 * n;
    }

    else
    {
        R = R - 0.5 * (n + 1);
    }

    cout << R << endl;

    return 0;
}

// 1519482222019

#include<iostream>
using namespace std;
int main()
{
	long long n;

	if(n%2!=0)
	{
		cout<<(-(n+1))/2;
	}
	if(n%2==0)
	{
		cout<<n/2;
	}
}

#include <iostream>

using namespace std;

int main()
{
    long long  n;
    cin>>n;
    long long a1=1;
    long long  a2=2;
    int d=2;
    long long sum1;
    long long  sum2;
    long  long  b1;
    long long   b2;
    if(n%2==0)
    {
         b1=n-1;
         b2=n;
    }
    else
    {
      b1=n;
      b2=n-1;
    }
    long long  num1;
    num1=((b1-a1)/d)+1;
    long long   num2=((b2-a2)/d)+1;

sum1=(((num1)*(a1+b1))/2)*-1;
sum2=((num2)*(a2+b2))/2;
long long answer=sum1+sum2;
    cout<<answer;
     return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n;
	cin>>n;

	long long signed int odd=(n-1)/2+1;
	long long signed int even=n/2;
	long long unsigned int sum_odd=odd*(2+(odd-1)*2)/2;
	long long signed int sum_even=even*(4+(even-1)*2)/2;
	long long signed int ans=sum_even-sum_odd;
	cout<<ans;

}

            #include<bits/stdc++.h>
            using namespace std;
            int main()
            {

                unsigned long long int n,i,sum=0;
                cin>>n;
                if(n%2==0)
                {
                    cout<<n/2;
                }
                else
                {
                    cout<<-(n+1/2);
                }

            return 0;
            }

#include<bits/stdc++.h>
using namespace std;
main()
{
   long long unsigned int n,f=0;
	cin>>n;
	if(n%2==0)
	f=n/2;
	else
	f=-(n/2+1);
	cout<<f;
	return 0;
}

#include <iostream>

using namespace std;

int main()
{
	unsigned long int n;
	cin >> n;

	if(n % 2 == 0)
	{
		float p1 = (2 + n) * (n / 2);
		float p2 = (1 + n - 1) * (n / 2);

		cout << 0.5 * (p1 - p2);
		return 0;
	}
	else
	{
		float p1 = (1 + n) * ((n / 2) + 1);
		float p2 = (2 + n - 1) * (n / 2);

		cout << 0.5 * (p2 - p1);
		return 0;
	}

}

#include <iostream>
using namespace std;

int main()
{
   long long n,sum=0;
   cin>>n;
   sum=(n*(n+1))/2;
   long long k= (n+1)/2;
   long long sum1=k*k;
   cout<<sum-2*sum1;

}

#include<iostream>
#include<cmath>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);
    long long int num,res,numb2;
    cin>>num;
    numb2=floor(num/2);
    res=2*numb2*(numb2+1) - num*(num+1)/2;
    cout<<res<<"\n";
    return 0;
}

    #include<bits/stdc++.h>
    using namespace std;

    int main(){
        unsigned long long int n;
        cin>>n;
        unsigned long long int odd,sum = n*(n+1)/2;
        if(n%2 == 0)    odd = (n/2)*(n/2);
        else    odd = (n/2+1)*(n/2+1);
        cout<<sum-2*odd;
        return 0;
    }

#include<iostream>
using namespace std;
int main()
{
    unsigned long n;
    long int s=0;
    cin>>n;
    if(n%2==0)
        s=n/2;
    else
        s=-(n+1)/2;
    cout<<s;
    return 0;
}

#include <iostream>
using namespace std;

int main()
{
int n;
cin >> n;
if (n%2==0) {
    cout << n/2 << endl;
}
if (n%2==1) {
    int f=-(n/2+1);
    cout << f << endl;
}

	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int n,sum=0;
	cin>>n;
	if(n%2==0)
	{
		sum=n/2;
	}
	else
	{
		sum=(n-1)/2-n;
	}
	cout<<sum;
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main()
{

    long long int num;

    cin>>num;

    if(num%2==0)
    cout<<(ceil(num/2));
    else
    cout<<-ceil((float)num/2);

    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    int n,i,a,x=0;
    cin>>n;
    for(i-0;i<n;i++)
    {
        cin>>a;
        if(a%2==0)
        {
            x=x+a;
        }
        else
        {
            x=x-a;
        }
    }
    cout<<x;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int fonct(long long int n) {
	if (n % 2 == 0)
		n = n / 2;
	else
		n = (n - 1) / 2 - n;
	return n;
}
int main()
{
	unsigned long long int n ;
	cin >> n;

	cout << fonct(n);
	return 0;
}

#include <iostream>
#include <cmath>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin>>n;
    int p;
    if(n % 2 == 1){
        p = -(n+1)/2;
    }
    else{
        p = n/2;
    }
    cout<<p;

    return 0;
}

#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
	long long x=0;
	long long sum=-2;
	cin>>x;
	if(x==1)
	{
		cout<<-1;

	}
	else if(x==2)
	{
		cout<<1;
	}
	else if(x==3)
	{
		cout<<-2;
	}
	else
	{
	sum=(x*(x+1))/2;
	sum-=6;

sum-=x;

		if(x%2==0)
		{
			cout<<-2+sum+x;
		}
		else
		cout<<-2+sum-x;

}
}

#include <iostream>

using namespace std ;

        int sum ;

int main(){

    long long n ;

    cin >> n ;
            cout << (n*(n - 1))/2 - n << endl ;
    return 0 ;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	int number;
	cin >> number;
	int result;
	if(number%2==0){
		result=number/2;
	}
	else{
		number++;
		result=(-1)*(number/2);
	}
	cout << result;
	return 0;
}
// 1521577248251

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int main() {
    int a,b=1,c=1,sum=0,d;
    cin>>a;
    d=a;
    while(c<=a)
   { sum=sum-b+d;
    -(d--);
    -(b++);
    c++;
   }
   cout<<sum;
    return 0;
}

#include<bits/stdc++.h>
#define ll unsigned long long int
using namespace std;

int main(){
    ll n;
    cin>>n;
    ll odd,even,ano,ane;
    if(n%2==0){
        odd=n/2;
        ano=n-1;
        ane=n;
    }
    else{
        odd=n/2+1;
        ano=n;
        ane=n-1;
    }
    even=n/2;
    ll sumo,sume;
    sumo=(odd*(1+ano))/2;
    sume=(even*(2+ane))/2;
    ll ans=abs(sume-sumo);
    if(n%2==0) cout<<ans;
    else cout<<"-"<<ans;
}

#include <iostream>

#include <cmath>

using namespace std ;

int main ()

{

    long long n , i = 1 , sum = 0   ;

    cin >> n ;

    while ( i <= n )

    {

     if ( i % 2 != 0)
    {

      sum = sum - i ;

    }

    sum = sum + i ;

    ++i ;

    }

   cout <<  sum ;
    return 0 ;
}

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
   int x,tot=0;
   scanf("%d", &x);
   if (x%2!=0)tot=-(x+1)/2;
   if (x%2==0)tot=x/2;
   printf("%d\n", tot);
    return 0;
}

// 1519480957856

#include<iostream>
#include<math.h>
using namespace std;

int solve(long long int n)
{
	if(n%2==0)
	return n/2;
	else
	{
		long long int x=((n+1)/2);
		x=(-x);
		return x;
	}
}

main()
{
	long long int n;
	cin>>n;
	cout<<solve(n)<<endl;
	return 0;
}

#include <iostream>
using namespace std;
int main()
{
  int n;
  cin>>n;
  if(n%2==0)
    cout<<n/2;
    else
    cout<<-(n/2+1);

  return 0;
}

#include <iostream>

using namespace std;

int main()
{
    long long  n;
    cin>>n;
    long long
     a1=1;
    long long  a2=2;
    int d=2;
    long long sum1;
    long long  sum2;
    long  long  b1;
    long long   b2;
    if(n%2==0)
    {
         b1=n-1;
         b2=n;
    }
    else
    {
      b1=n;
      b2=n-1;
    }
    long long  num1;
    num1=((b1-a1)/d)+1;
    long long  num2=((b2-a2)/d)+1;

sum1=(((num1)*(a1+b1))/2)*-1;
sum2=((num2)*(a2+b2))/2;
    cout<<sum1+sum2;
     return 0;
}

#include <iostream>

using namespace std;
int main(int argc, char *argv[]) {
	long long ans = 0;
	int n=0;

	cin >> n;

	if(n%2 ==0){
		ans = n/2;
	}else{
		ans = 0-((n/2)+1);
	}
	cout << ans;
}

#include <bits/stdc++.h>
#define REP(i, a) for(int i = 0; i < a; i++)
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define pb push_back
#define all(a) a.begin(), a.end()
using namespace std;

long long f(int n){
    if( n == 1 ) return -1;
    long long par, impar;
    if( n%2 == 0 ){
        par = impar = n/2;
    }else{
        par = (n-1)/2;
        impar = (n+1)/2;
    }
    return (par*(par+1)) - (impar*impar);
}
int main(){
  //freopen("input.txt", "r", stdin);
  //freopen("out.txt", "w", stdout);

    int n;
    scanf("%d", &n);
    cout << f(n) <<endl;

  //fclose(stdin);
  //fclose(stdout);
    return 0;
}

#include<stdio.h>
#include<iostream>
using namespace std;
int main()
{
    long long int n,p,p1,res,n1;
    cin>>n;
    //scanf("%lld",&n);
    if(n%2==0)
    {
        n1=n/2;
        p=2*(n1*(n1+1))/2;
        p1=(n1*n1);
        res=(p-p1);
        printf("%lld\n",res);
    }
    else
    {
        n1=(n/2);
        p=2*(n1*(n1+1))/2;
        p1=(n1+1)*(n1+1);
        res=(p-p1);
        printf("%lld\n",res);

    }
    return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int main()
{

	long long int count;
	cin >> count;
	long long int  s1, s2, sum = 0;
	if (count % 2 == 0)
	{

			s2 = count / 2;
			s1 = (count / 2) ;

			sum += s2*(2 + count) / 2;
		    sum += -1 * (s1*(1 + count - 1) / 2);

	}
	else
	{

			s1 = (count / 2) + 1;
			sum += -1 * (s1*(1 + count ) / 2);
			s2 = count / 2;
			sum += s2*(2 + count-1) / 2;
	}

	cout << (long long)sum;
		return 0;
}