1. Java, Gunnar Hage

/**
* FWP-Fach: ACM programming Contest WS 08/09 "10079 - Pizza Cutting"
* Verdict: accepted / 0.090
*
* Gunnar Hage, gunnarhage@gmx.de
* AP5(IFB5A) Okt. 2008
*/
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
public class Main {

public static void main(String... args) throws IOException{
BufferedWriter br = new BufferedWriter(new OutputStreamWriter(System.out));
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
long n = Integer.parseInt(reader.readLine());
//while reader.ready();
while(n >= 0){
n = (1 + n*(n+1)/2);
br.append(n + "\n");
n = Integer.parseInt(reader.readLine());
}
br.flush();
br.close();
System.exit(0);
}
}