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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int n;
  while (cin >> n) {
    int s = 1;
    loop(i, 1, n + 1) s += i;
    cout << s << endl;
  }
}

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

int main(){
    int x, i;
    vector<int> in;

    while (cin >> x) {
        in.push_back(x);
    }

    for (i = 0; i < in.size(); ++i) {
        cout << (in[i] * in[i] + in[i] + 2) / 2 << endl;
    }
}

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>
using namespace std;
int main(void) {
  int n;
  int dev;

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

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;

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

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

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

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

vector<int>f(int n){
  vector<int>r;
  for(;n;n/=10)r.push_back(n%10);
  sort(all(r));
  return r;
}

int g(vector<int>r){
  int n=0;
  for(int x:r)n=n*10+x;
  return n;
}

int main() {

  loop {
    int n; cin >> n;
    if (!cin) break;
    cout << (1 + n*-~n/2)<<endl;

  }

  return 0;
}

C++: #include <iostream>

using namespace std;

/** Application main entry point. */
int main (
  int     argc,
  char  * argv[ ]
  )
{
  while ( true )
  {
    int n;

    if ( !( cin >> n ) )  break;
    cout << ( 1 + n * ( n + 1 ) / 2 ) << endl;
  }

  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>
#include <cstdio>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to)

int main() {
	int f[10001];
	f[1] = 2;
	rep2(i,2,10001) {
		f[i] = f[i-1] + i;
	}
	int n;
	while(cin >> n) {
		cout << f[n] << endl;
	}
	return 0;
}

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

int main()
{
 int n, m ,count;
 while(cin>>n)
 {
  if(n>2)
  {
    for(int i=0; i<n-2; i++)
     {
        m+=count;
        count++;
      }
     cout<<n*m+count<<endl;
    }
   else
   {
    cout<<n*2<<endl;
   }
   }
  return 0;
}

C++: #include<iostream>

int main(){

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

	return 0;
}

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

int dp[10001];

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

C++: #include <cstdio>

using namespace std;

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        int a = 1;
        for(int i = 1;i <= n; i++){
            a += i;
        }
        printf("%d\n",a);
    }
    return 0;
}

C++: #include <iostream>

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 <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back

int f(int n) {
    if(n == 0) return 1;
    else
        return f(n-1) + n;
}

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

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

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

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

C++: #include <iostream>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;
int aaa(int n){
	if(n==0)
		return 1;
	else if(n<0)
		return 0;
	else
	return aaa(n-1)+aaa(n-2)+1;
}

int main(){
	
	int n;
	
	while(cin>>n){
		cout<<aaa(n)<<endl;
	
}
}

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