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<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;

 int main()
 {
    int n;
    while(cin>>n)
    {
      long long int sum;
      sum=n*(n+1)/2+1;             
    }
    cout<<sum<<endl;
   //while(1);
   return 0;
 }

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>
#include<memory>

using namespace std;

int main()
{
  int n;

  while ( cin >> n )
    {
      cout << n * (n + 1) / 2 + 1 << endl;
    }
  
  return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8

static const double PI=6*asin(0.5);
typedef complex<double> P;
typedef long long ll;


//1=2
//2=4
//3=6+1=7
//4=8+3=11
//5=10+6=16
//6=12+10=22

int n;
vector<int> a;
int main(){
	a.PB(0);
	a.PB(0);
	a.PB(0);
	a.PB(1);
	a.PB(3);
	while(cin>>n){
		ll res=2*n;
		if(n>a.size()-2){
			while(n==a.size()){
				a.PB(a[a.size()-1]+a.size()-2);
			}
		}
		res+=a[n];
		cout<<res<<endl;
	}
	return 0;
}

C++: #include <cstdio>

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

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

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

int main()
{
 int n, m ,count;
 while(cin>>n)
 {
  if(n>2)
  {
    for(int i=0; i<n-2; i++)
     {
        m+=count;
        count++;
      }
     cout<<n*2+m<<endl;
    }
   else
   {
    cout<<n*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>
#include <vector>

using namespace std;

int main(){

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

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#define MAX_N 10001
using namespace std;
int seq[MAX_N];
void init() {
    int ans = 1;
    for(int r = 0; r < MAX_N; r++) {
        seq[r] = ans; ans += r + 1;
    }
}

int main(void) {
    init();
    int input;
    while(cin >> input) {
        cout << seq[input] << endl;
    }
    return(0);
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	while(cin >>n){
		int x = 1;
		n++;
		while(n--){x+=n;}
		cout <<x<<endl;
	}
	return 0;
}

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

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

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

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>
using namespace std;

int main(void)
{
	int n;
	
	while (cin >> n){
		if(n == EOF) return 0;
		cout << ((n * n) + n + 2) / 2 << endl;
	}
	
	return 0;
}

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

int main()
{
	int n, i, num;
	while (cin>>n) {
		num = 1;
		for (i = 1; i <= n; i++)
			num += i;
		cout<<num<<endl;
	}
	return 0;
}

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

using namespace std;

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

  while(scanf("%d", &x) != EOF ){
    if(x == 1){
      cout << a_1;
    }else{
      s += a_1;
      for(int i = 1; i <= x; i++){
        s += i;
      }
    }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
  int n, x;

  while(cin>>n){
    for(int i = 0; i < n; ++i){
      if(i==0){
	x=2;
      }else x += (1 + i);
    }
    cout << x << endl;
    
  }
    
  return 0;
}

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

int main(){
	int n;
	while(cin>>n){
		long int ans = 1;
		for(int i =0;i<=n;i++){
			ans += i;
		}
		cout << ans << endl;
	}
	return 0;
}

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

int sygma(int n){
	if(n == 1) return 1;
	
	return n + sygma(n - 1);
}

int main(){
	int n;
	while(scanf("%d", &n) != EOF){
		printf("%d\n", 1 + sygma(n));
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;

	while (cin >> n) {
		cout << (n*n + n + 2) / 2 << endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main( void )
{
	int n;
	while ( cin >> n )
	{
		if ( n > 2 )
		{
			int m = 0;
			int cnt = 1;
			for ( int i = 0; i < n-2; i++ )
			{
				m += cnt;
				cnt++;
			}
			cout << 2 * n + m << endl;
		}
		else
			cout << 2 * n << endl;
	}
	return 0;
}

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

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

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

int main(){
  int n;
  while(cin>>n){
  cout << 1/2*n*(n+1)+1 <<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

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

C++: #include <iostream>

using namespace std;

long long a[10001];

int main(){
    a[1] = 2;
    for(int i = 2; i <= 10000; i++){
        a[i] = a[i-1] + i;
    }
    int n;
    while(cin >> n){
        cout << a[n] << endl;
    }
}

C++: #include<iostream>

using namespace std;

//  A_n - A_(n-1) = n 
main(){
  int n;
  
  while(cin >> n){
    int out =2;
    
    for(int j=2;j<=n;j++){
      
      out += j;
      
    }
    cout << out << endl;
  }
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
  int n,x;
  while(cin>>n){
    x=1;
    for(int i=1;i<=n;i++){
      x+=i;
	}
    cout<<x<<endl;
  }
   		       
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int ans[20000]={};
  ans[1]=2;
  for(int i=2;i<=10000;i++){
    ans[i]=ans[i-1]+i;
  }
  int n;
  while(cin>>n)
    cout<<ans[n]<<endl;
  return 0;
}

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

int main(){
  int n;
  while(cin >> n){
  cout <<  (int) ((n*n + n + 2) * 0.5) << endl;
  }
  return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

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

C++: #include <stdio.h>

int main(void) {
	int a, b, i, j;
	scanf("%d",&j);
	for(i = 1; i <= j; i++){
		scanf("%d", &a);
		b = (1 + a) * a / 2 + 1;
		printf ("%d\n", b);
	}
	return 0;
}