import java.util.Scanner;
class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
long no = sc.nextLong();
if (no<0l) break;
System.out.println(1+((no*(no+1l))/2l));
}
}
}
class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
long no = sc.nextLong();
if (no<0l) break;
System.out.println(1+((no*(no+1l))/2l));
}
}
}
No comments :
Post a Comment