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 <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(){
	int n;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif


#if INPUT_FROM_FILE
	while(ifs >> n){
#else
	while(std::cin >> n){
#endif
		std::cout << 1 + n * (n + 1) / 2 << std::endl;
	}

#if INPUT_FROM_FILE
	//fclose(fp);
#endif
	return 0;
}

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

int main(){
int a[10010];
a[0]=1;
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 <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>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int n;
int dp[11000];

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

C++: //50
#include<iostream>

using namespace std;

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

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

int main(){
    int n, c;
    while(cin >> n){
        //f(n+1) = f(n) + n + 1
        //f(n) = 2 + 2 + 3 + 4 ... n = 1 + n(n+1)/2
        c = n * (n+1) / 2 + 1;
        cout << c << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(ll i=0;i<n;i++)
using namespace std;
typedef long long ll;

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

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

using namespace std;

void Solution()
{
    int n;
    
    while(cin>>n)
    {
       //algorithm
       cout<<(n * (n + 1) / 2 + 1)<<endl; // 1+1 2+2 4+3 7+4 ....... (1+2+4)7 + (n = )4
    }
}

int main()
{
    Solution();
    return 0;
}

C++: #include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <stack>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <iterator>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

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

C++: #include <iostream>
#define rep(i,n) for (int i = 0; i < n; i++)
using namespace std;

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