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 argc, char const* argv[])
{
	int a;
	while( cin >> a ){
		cout << ( a + 1 + a * ( a - 1 ) / 2 ) << endl;
	}
	return 0;
}

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

C++: #include<iostream>

int main(){

	int n;
	std::cin >> n;
	std::cout << n*n*0.5 + n*0.5 + 1 << std::endl;

	return 0;
}

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

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <memory.h>
#include <cassert>
#include <iomanip>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


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

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

using namespace std;

int main(void){

  int n,m=2,ans[10001];

  fill(ans,ans+10001,0);
  ans[1]=2;

  for(int i=2;i<10001;i++)
    ans[i]=ans[i-1]+m++;
  
  while(cin >> n)cout << ans[n] << endl;

  return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include <stdio.h>

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

C++: #include <cstdio>

int line[10001];

int rec(int n){
	if(line[n] != -1) return line[n];
	if(n == 0) return line[n] = 0;
	if(n == 1) return line[n] = 2;
	return line[n] = rec(n-1) + n;
}
int main(){
	int n;
	for(int i = 0; i < 10001; i++) line[i] = -1;
	while(scanf("%d", &n) != EOF){
		printf("%d\n", rec(n));
	}
	return 0;
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class t>
using table = vector<vector<t>>;
const ld eps=1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.answer"

vector<int>sos;
void hurui(const int amax) {
	static bool flag = false;
	if (flag)return;
	sos = vector<int>(amax + 1, true);
	sos[0] = false; sos[1] = false;
	for (int i = 2; i <= amax; ++i) {
		if (sos[i]) {
			for (int j = 2 * i; j <= amax; j += i)sos[j] = false;
		}
	}
}

int main() {
	hurui(100000);
	ld a;
	while (cin >> a) {
		cout<< a*(a + 1) / 2 + 1<<endl;

	}
	return 0;
}

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

int main(){
  int x;vector<int> anss;
  while(cin>>x){
    anss.push_back(1+0.5*x(x+1));
  }
  for(int i=0;i<anss.size();i++){
    cout<<anss[i]<<endl;
  }
  return 0;
}

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

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

C++: import sys
N=10000+1
d=[0]*N
d[0]=1
for i in xrange(1,N):
    d[i]=d[i-1]+i
for line in sys.stdin.readlines():
    print d[int(line.strip())]

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

using namespace std;

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

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

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

    
}

C++: #include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <string>
#include <stack>
#include <iomanip>
#include <numeric>
#include <queue>
#include <climits>
#include <set>
#include <complex>
#include <cmath>
#include <map>
using namespace std;
using ll = long long;
#define MOD 1000000007
#define INF 1LL << 59

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    //cout << fixed << setprecision(7);

    long n;
    while (scanf("%ld", &n) != EOF)
    {
        cout << n * (n + 1) / 2 + 1 << endl;
    }

    return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	int i;

	while(scanf("%d",&i)!=EOF)
		printf("%d\n",1+(1+i)*i/2);
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int a;

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

    return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    for(;;){
        int n;
        if(!(cin >> n))
            return 0;

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

C++: #include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int mina(){
 ll n;
 while(cin>>n){
  cout<<(n*n+n+2)/2<<"\n";
 }
}

C++: //0057

//0{Å1,1{Å2A2{Å4A3{Å7EEE
//·Èí¿A1+sum{1=>n}(n);?
//Æè ¦¸A1`nÌñÌaÍn(n+1)/2¾
#include<stdio.h>
int main(void)
{
	int n;
	while(scanf("%d", &n) == 1)
	{
		printf("%d\n", 1+ n*(n+1)/2);
	}
	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<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int in;
  while(cin>>in){
    int out=1;
    rep(i,in)out+=i+1;
    cout<<out<<endl;
  }
}

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