364 - Sum of the Sequence
Sum of the Sequence
Time Limit: 1 sec
The Problem
Given an interesting sequence in below. In this problem you have to find out the result of the sequence.
1 – 2 + 3 – 4 + 5 – 6 + 7 - . . . . . . . . . . . . . n =??
Example:
If n = 6 then
1 – 2 + 3 – 4 + 5 – 6 = -3
So the answer of this sequence is -3.
The Input
There are several lines of input. Each line contains a single integer n (1<= n <=5000000). Input is terminated by EOF.
The Output
For each line, output the line “Case T: R” (Quotes for clarification), where T denote the test case and R denotes the result of the sequence.
Sample Input
6
10
Sample Output
Case 1: -3
Case 2: -5
Problem Setter: Milton Deb