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 <cstdlib>

int get_input(void) {
    int i;
    std::cin >> i;

    if (std::cin.fail()) {
        exit(0);
    }

    return i;
}

int solve(int nol) {
    if (nol == 1) {
        return 2;
    } else {
        return solve(nol-1) + nol;
    }
}


int main(void) {
    while (true) {
        std::cout << solve(get_input()) << std::endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n, i, s;
  int a[1000];
  a[0]=2;
  for(i=1; i<1000;i++){
    a[i]=a[i-1]+i+1;  
  }
  while(cin>>n){
  cout<<a[n-1]<<endl;
  }
  return 0;  
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
using namespace std;

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

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

using namespace std;

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


int main(){
	for(int n;cin>>n;){
		int sum = 1;
		rep(i,n+1)sum+=i;
		printf("%d\n",sum);
	}
}

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<ll> 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 <iostream>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int t=2;
		if(n==1) cout<<t<<endl;
		else{
			for(int i=2;i<=n;i++){
				t+=i;
			}
			cout<<t<<endl;
		}
	}
	return 0;
}

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

int main(){
   int n;
   int a = 1;
   while(cin>>n){
      if(n <= 2*a){
         cout << 2*n << endl;
      }else if(n <= 4*a){
         cout << 2*n + a << endl;
      }else if(n <= 6*a){
         cout << 2*n + 2*a << endl;
      }else{
         cout << 2*n + 4*a << endl;
      }
   }
   return 0;
}

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

C++: #include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repr(i,a,n) for(int i=a;i>=n;i--)
#define INF 999999999
#define INF_M 2147483647
#define pb(a) push_back(a)
using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;

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

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);
    }
    
  }
return 0;
}

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

long long int answer[10002];
long long int ans(int in, long long int answer[]){
	if (in == 1){
		answer[in] = 2;
		return answer[1];
	}
	answer[in] = ans(in - 1, answer) + in;
	return answer[in];
}

int main(){
	int in;

	ans(4709, answer);
	while (cin >> in, !cin.eof()){
		cout << answer[in] << endl;
	}

	return 0;
}

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

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

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

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

C++: #include<iostream>
using namespace std;
int main(void){
	while( 1 ){
		int n;
		cin >> n;
		if( cin.eof() ) break;
		cout << (n * n + n + 3) / 2 << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	int in;
	while(cin>>in, !cin.eof()){
		cout<<((in*2)+1)<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
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 && n){
    cout << (n*n+n+2)/2 << endl;
  }

  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n;
  
  while(cin >> n){

    int sum = 1;

    for(int i = 1; i <= n; i++){
      sum += i;
    }

    cout << sum << endl;
  }

  return 0;
}

C++: #include<cstdio>

int DP[10005]={0};

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

int n;
int main()
{
	set();
	while(scanf("%d",&n)!=EOF)
	{
		printf("%d\n",DP[n]);
	}
	return 0;
}

C++: #include <iostream>

int main()
{
    int n;
    while(cin>>n) {
        n%2 ? printf("%d\n",n*2+1):printf("%d\n",n*2);
    }
    return 0;
}

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

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

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

C++: #include <stdio.h>

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

int main(void)
{
    int n;
    while (scanf("%d", &n) != EOF) {
        printf("%d\n", calc(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>
#include <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

typedef long long ll;
typedef double D;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }

int MAX = 10000;
vci S;

void shutainer() {
	S.assign(MAX  + 1, 1);
	for_(i, 1, MAX + 1) S[i] = S[i-1] + i;
}

int main() {
	shutainer();	
	
	int n;
	
	while (cin>>n) {
		cout << S[n] << endl;
	}
	
	return 0;
}