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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

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 n;
	while(cin>>n) {
		int res=0;
		for (int i=0; i<n; i++) res += 2;
	}
	cout << res << endl;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
#include<sstream>
#include<iterator>
#include<list>

using namespace std;

typedef  long long int lint;

#define rep(i, n) for (lint i = 0; i < n; i++)
#define sort(v) sort((v).begin(), (v).end())
#define reverse(v) reverse((v).begin(), (v).end())
#define upper(v,hoge) upper_bound(v.begin(),v.end(),hoge)
#define lower(v,hoge) lower_bound(v.begin(),v.end(),hoge)
#define mp make_pair
#define IP pair<int,int>
#define enld endl

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

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

int main(){
	int n, ans = 0;
	
	while(cin>>n){
		for(int i = 1; i <= n; i ++){
			if(i % 2) sum += 2;
			else sum +=3;
		}
		cout<< ans<<endl;
	}

	return 0;
}


//2 4 7 9

C++: #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif


using namespace std;

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

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

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

int main(){
  int n, x;

  while(true){
    cin >> n;
    for(int i = 0; i < n; ++i){
      x += (2 + i);
    }
    
  }
    
  return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: main(N){while(~scanf("%d",&N))printf("%d\n",N*(N+1)/2+1);}

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

int main(){

  int n;
  cin >> n;

  int a[10001] ;
  a[1] = 2;
  for(int i=2;i<=n;i++) a[i] = a[i-1] + i;

  cout << a[n] << endl;

  return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

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

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

C++: #include <iostream>

int heimen(int nn){
	int a;
	a=((nn*nn)+nn+2)/2;
	return a;
}
using namespace std;

int main(){
	int n,ans;
	while(cin>>n,n){
		ans=heimen(n);
		cout<<ans<<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++: #include <stdio.h>

int main(void){
	int i , n , a1 , a2;
	while(scanf("%d" , &n)!=EOF){
		a1 = 2;
		if(n==1){
			printf("%d\n" , a1);
			continue;
		}
		for(i=2;i<=n;i++){
			a2 = a1 + i;
			a1 = a2;
		}
		printf("%d\n" , a2);
	}
	return 0;
}

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

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

C++: int main(int argc,char *argv[]){
	int n,ans;
	while(std::cin >> n){
				ans = (n*(n+1))/2+1;
				std::cout << ans <<std::endl;
	}
}

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

#define f first
#define s second

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define EPS (1e-10)
using namespace std;

typedef unsigned int uint;
typedef long long ll;
typedef complex<double> P;

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

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

int main(void) {
	int n=0;
	vector<int> r;
	while (scanf("%d",&n) != EOF)
	{
		r.push_back((1+n)*n/2+1);
	}
	for (int i; i<r.size(); i++)
	{
		cout << r[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main() {
	int n;
	while(cin>>n) {
		cout << 2*n+(int)pow(2,n-3) << endl;
	}
}