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

int main(){

  int a[10001] ;
  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;
  }
  
  return 0;
}

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

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

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

int main(){
    
    int n;
    int count = 2;
    cin >> n;
    for(int i = 1;i<n;i++){
        if(n == 1) break;
        count += i + 1; 
    }
    
    cout<< count <<endl;
    
}

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

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

C++: #include <stdio.h>

int main(void){
	int line[10000];
	int tem;
	line[0]=2;
	for(int i=1;i<10000;i++)
		line[i]=line[i-1]+i+1;
	while(scanf("%d",&tem)!=EOF)
		printf("%d",line[tem-1]);
	return 0;
}

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

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

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n;
  while( cin >> n ){
    int ans = 2;
    for(int i = 2,j = 1  ; j < n ; j++,i++){
      ans += i;
}
    cout << ans << endl;
  }
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <algorithm>
#include <math.h>
#include <map>
#include <iomanip>
#include <vector>
#include <queue>
#include <set>

#define PI 3.14159265359

#define INF 1000000;

#define rep(i, n) for(int i=0; i<n; i++)
#define REP(n) rep(i, n)

typedef long long ll;

using namespace std;


/*
class ElectronicPetEasy
{
public:
	string isDifficult(int st1, int p1, int t1, int st2, int p2, int t2)
	{
		
	}
};
*/



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

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

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
int N; while(cin >> N){ cout << ((N+1)*N/2+1) << endl; }
return 0;
}

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

const int MAX_N = 10000;
int N;
int dp[MAX_N+1];

int main()
{
  dp[0] = 1;
  erep(i, 1, MAX_N) dp[i] = dp[i-1] + i;


  while(~scanf(" %d", &N)){
    printf("%d\n", dp[N]);
  }

  return 0;
}

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

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

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

int n;

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

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

int areanum[MAX];

int getarean(int n)
{
    return (areanum[n]!=0)? areanum[n] : getarean(n-1)+n;
}

int main()
{
    areanum[1] = 2;
    int n;
    while(cin >> n)
    {
        cout << getarean(n) <<endl;
    }
    return 0;
}

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

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

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

using namespace std;

int keisan (int a) {
	if (a == 1) {
		return 2;
	} else {
		return a + keisan(a-1);
	}
}

int main() {
	int n;
	while (cin >> n) {
		cout << keisan(n) << endl;
	}
	return 0;
}

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

int main(){

  int n=0;
  
  while(scanf("%d",&n) != EOF){
    int sum=1;
    
    for(int i=1;i<=n;i++){ 
      sum = (sum-i) + i*2;
    }

    printf("%d\n",sum);
  }

  return 0;

}

C++: #include<cstdio>
main(){int n;for(;~scanf("%d",&n);printf("%d\n",1+(n+1)*n/2));}

C++: #include<iostream>
using namespace std;
int main() {
	int n;
	while (cin >> n&&n != 0) {
		cout << 1 + (n*n + n) / 2 << endl;
	}
	return 0;
}

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

C++: #include <iostream>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <numeric>
#include <utility>

#define rep(i,n)	for(int i = 0;i < n;i++)
#define rep2(i,n)	for(int i = 1;i <= n;i++)
#define each(i,x)	for(auto & i : x)

using namespace std;

int main()
{
	while(1)
	{
		int n;
		cin >> n;
		if(cin.eof())
		{
			break;
		}
		int k = 1;
		rep2(j,n)
		{
			k += j;
		}
		cout << k << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;i<(n);i++)
#define REP(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define INF LLONG_MAX - 100
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
#define int long long
#define yorn(f) puts((f)?"Yes":"No")
#define YORN(f) puts((f)?"YES":"NO")
#define lowb lower_bound
#define upb upper_bound
typedef long long ll;
typedef pair<int, int> P;
typedef priority_queue<int> pque;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a/gcd(a,b)*b;};
int mod(int a,int b){return (a+b-1)/b;};
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
template<typename A, size_t N, typename T>
void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};



signed main() {
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(false);

	int n;
	int a[10010];
	a[1] = 2;
	REP(i, 2, 10010) a[i] = a[i-1] + i;

	while(cin >> n) {
		cout << a[n] << endl;
	}
	return 0;
}

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

int main(){
	int n;
	while(cin >> n && n){
		int sum = 2;
		int piyo = 2;
		for(int i=1; i<n; ++i){
			sum += piyo;
			piyo++;
		}
		cout << sum << endl;
	}
	return 0;
}

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

int n;

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

C++: 
#include <iostream>

using namespace std;

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

C++: #include<bits/stdc++.h>

using namespace std;

int main(){
  int n;
  int ans=0;

  while(1){
    cin >> n;
    if(n == EOF) break;
    
    int line[n+1];
    line[0]=1;
    
    for(int i=1;i <= n;i++)
      {
	line[i] = line[i-1] + i;
      }
    cout << line[n] << endl;
  }
  return 0;
}