#234. 函数计算

函数计算

说明

f(n)=-1+2-3+..+((-1)^n)*n


你的任务是给定n,计算f(n)的值

输入格式

每组数据第一行为一个正整数n(n在int范围内)

输出格式

输出f(n)的值
1
2
7
-1
1
-4

Source

外部题库