题目链接:http://codeforces.com/contest/486/problem/A
题目分析:注意数据的大小
import java.util.Scanner;
public class Calculating_Function {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long n = scanner.nextLong();
if(n % 2 == 0) {
System.out.println(n / 2);
} else {
System.out.println(-(Math.abs(n)+1)/2);
}
}
}