Go: package main

import (
        "fmt"
)

func main() {
        var num int
        for {
                _, err := fmt.Scan(&num)
                if err != nil {
                        break
                } else {
                        fmt.Printf("%d\n", (num*num+num+2)/2)
                }
        }
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>

using namespace std;

//conversion
//------------------------------------------
inline long toLong(string s) {long v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const double EPS = 1e-9;
const double INF = 1e9;



long memo[10001];
int main(){
	int a;
	CLR(memo);
	memo[1]=2;
	FOR(n,1,10000)memo[n+1]=memo[n]+n+1;
	
	while(cin>>a)cout<<memo[a]<<endl;
	return 0;
}
/*

*/

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()
#define mp make_pair
#define pb push_back

using namespace std;

typedef pair<int, int> pii;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<string> vs;

const int INF = 1 << 24;

int main(void){
    for(int n; cin >> n; cout << n * (n + 1) / 2 + 1 << endl);

    return 0;
}

C++: #include <iostream>
int main(void){
    for (int n;std::cin>>n;) std::cout<<n*(n+1)/2+1<<"\n";
}

C++: #include <iostream>
#define N 10001


using namespace std;

main(){
  int dp[N];
  int n;
  dp[0]=1;
  for(int i=1;i<N;i++){
    dp[i]=i+dp[i-1];
  }
  while(cin >> n){
    cout << dp[n] << endl;
  }
  return 0;
}

C++: #include<iostream>

int main(){

	int n;
	while (std::cin >> n){
		std::cout << n*n*0.5 + n*0.5 + 1 << std::endl;
	}

	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime>

using namespace std;
long long int sum[10001];

int main(void){
	int i,n;
	sum[0]=1;
	for(i=1;i<=10000;i++){
		sum[i]=sum[i-1]+i;
	}
	while(~scanf("%d",&n)){
		printf("%d\n",sum[n]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;

int main() {

  int n;
  while( cin >> n ) {

    cout << 1+n*(n+1)/2 << endl;

  }

  return 0;

}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

int main(void){
  int a_1 = 2;
  int x;
  int s = 0;

  while(scanf("%d", &x) != EOF ){
    if(x == 1){
      printf("%d\n", a_1);
    }else{

      s += a_1;
      for(int i = 2; i <= x; i++){
        s += i;
      }
      printf("%d\n", s);
    }
    s = 0;
  }

  return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
	int n;
	while(cin >> n && !cin.eof()) {
		cout << 1 + 0.5 * n * (n + 1) << endl;
	}
}

C++: #include <iostream>
using namespace std;
int main() {
	int n;
	while(cin >> n, n && !cin.eof()) {
		cout << 1 + 0.5 * n * (n + 1) << endl;
	}
}

C++: #include <stdio.h>

int main(void) {
  long long i, j, k, n, ans[10010];
  ans[1] = 2;
  for(i = 2; i < 10010; ++i) ans[i] = ans[i - 1] + i;
  while(scanf("%lld", &n) != EOF) {
    printf("%lld\n", ans[n]);
  }
  return 0;
}

C++: #include<iostream>

int dp[10001];

int main()
{
	dp[0] = 1;
	for( int i = 1; i <= 10000; i++ ){
		dp[i] = dp[i-1] + i;
	}
	
	int a;
	while( std::cin >> a ){
		std::cout << dp[a] << std::endl;
	}

 	return 0;
}

C++: #include <cstdio>
#include <iostream>
using namespace std;

int max_area(int n)
{
  if (n == 1){
    return (2);
  }

  return ((n - 1) + n); // before sum area + sum draw line
}

int main()
{
  int n;

  while (~scanf("%d", &n)){
    printf("%d\n", max_area(n));
  }

  return (0);
}

C++: #include <stdio.h>
int main(void)
{
  int i,n,x;
  x=1;
  scanf("%d" ,&n);
  for (i=1;i<n+1;i++)
    {
      x = x+i;
    }
  printf("%d\n",x);
  return(0);
}

C++: #include<stdio.h>
int main(){
  int n;
  long long a[10001];
  a[1] = 2;
  for(int i=2;i<=10000;i++)
    a[i] = a[i-1]+i;
  while(scanf("%d",&n) != EOF)
    printf("%d\n",a[n]);
  return (0);
}

C++: #include <cstdio>

int main(){
	int n, a[1001];
	a[1] = 2;
	for(int i=2;i<=1000;i++){
		a[i] = a[i-1] + i;
	}

	while(~scanf("%d", &n)){
		printf("%d\n", a[n]);
	}
	return 0;
}

C++: #include<stdio.h>
int main()
{
	int n;
	for(;scanf("%d",&n)!=EOF;)
		printf("%d\n",n==0?0:(n*n+n)/2+1);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#include <map>


#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;


int main(void){

int n;
	while(cin >> n){
		if( cin.eof()  ) break;
		// a(n) = a(n-1) + n  a(0)=1, a(1)=2
		int a,oa=1;
		rep2(i,1,n+1){
			a = oa + i;
			oa = a;
		}
		cout << a << endl;
	}
	return 0;
	
	
}

C++: #include <iostream>

using namespace std;

int main(){

	int data[10000+1];
	for(int i=0;i<=10000;i++){
		data[i]=0;
	}
	data[0] = 1;

	for(int i=1;i<=10000;i++){
		data[i] = data[i-1] + i;
	}

	int num;
	while(cin>>num){
		cout<<data[num]<<endl;
	}

	return 0;

}

C++: #include<iostream>

using namespace std;

int main(){
	int n;
	while(cin>>n){
		
		int areas = 1;
		
		for(int i=1; i<=n; i++) areas += i;
		
		cout<<areas<<endl;
	}
}

C++: #include <iostream>
#include <vector>

using namespace std;

typedef long long ll;

int main(){
    vector<ll> vec(10001);
    vec[0] = 1;
    for(int i=1;i<=10000;i++){
        vec[i] = vec[i-1] + i;
    }
    int n;
    while(cin >> n){
        cout << vec[n] << endl;
    }
    return 0;
}
// int main(){
//      int n;
//      while(cin >> n){
//          cout << n*(n-1)/2 +1 << endl;
//      }
//      return 0;
// }

C++: #include <stdio.h>
int main()
{
	int a;
	int b;
	int i=1;
	int j=1;
	scanf("%d\n%d",&a,&b);
	for(;a > 0 ; a--){
		j = j+a;
	}
	for(;b > 0 ; b--){
		i = i+b;
	}
	printf("%d\n%d\n",j,i);
	return 0;
}

C++: #include<iostream>

using namespace std;

int get_num_of_area( int n );

int main(void)
{
	int n;

	while(1)
	{
		cin >> n;
		if( cin.eof() ) break;
		cout << get_num_of_area( n ) << endl;
	}

	return 0;
}

int get_num_of_area( int n )
{
	/*
		初期平面数1から直線本数が1本増えるごとに
		エリア数は直線本数総数分だけ増える。
	*/
	return 1 + n*(n+1)/2;
}