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>

using namespace std;

typedef long long ll;

int main(){
    vector<ll> vec;
    vec[0] = 1;
    for(int i=1;i<=10000;i++){
        vec[i] = vec[i-1] + i;
    }
    int n;
    while(cin >> n){
        cout << vec[n] << endl;
    }
    return 0;
}
// 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){ 
                cout << (n*n+n)/2+1 << endl;
        }   
}

C++: #include <stdio.h>
#include<math.h>
#include <string.h>
#include <ctype.h>

int main(){
int n,f,i;
int a[10001];
a[1]=2;
for(i=2;i<=10000;i++){
a[i]=a[i-1]+i;
}
while(scanf("%d",&n)!=EOF){
printf("%d\n",a[n]);
}

return 0;
}

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

C++: #define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;

int tile[20][20];


int main(){
	int n;
	while (cin >> n){
		if (n == 1)
			cout << 2 << endl;
		else
			cout << n - 2 + 2 * n << endl;
	}

	return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
#include<map>
#include<cmath>
#include<complex>
using namespace std;

typedef complex<double> P;

#define X real()
#define Y imag()
typedef int kz;

kz gcd(kz a,kz b) { if(b==0) return a; else gcd(b,a%b); }

int main(){
    int mod=1000000007;
    int n;
    while (scanf("%d",&n)!=EOF) {
        printf("%d\n",n*(n+1)/2+1);
    }
    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++: #include <iostream>
using namespace std;

int main() {
	long n;
	long sum=2;
	for(int i=0; i<50; i++){
		if(cin >> n){
		
		for(long j=2;j<=n;++j){
			sum+=j;
		}
		cout<<sum<<endl;
		sum=2;
		}
	}
	return 0;
}

C++: #include<cstdio>

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

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

int main()
{
 int n;
 while(cin>>n)
 {
  if(n>2)
  {
   int m=1, count=0;
    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>
using namespace std;

int main() {
	int n;
	while(cin >> n){
		int ans = 1;
		int line = 0;
		while(line < n){
			line++;
			ans += line;
		}
		cout << ans << 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=0;i<=n;i++){
            sum=sum+i;
        }
        cout<<sum+1<<endl;
    }
	return 0;
}

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

int main(){
	int n;
	while( scanf(" %d", &n) != EOF){
		long ans=2;	
		for(int i=1; i<n; ++i) ans+=i+1;
		printf("%ld\n", ans);
	}
	return 0;
}

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

int main(){
    int n;

    while(cin>>n){
        int div=2;

        for(int i=2;i<=n;i++){
            div+=i;
        }
        cout<<div<<endl;
    }

    return 0;
}

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; ) {
		int ans = 2;
		rep(i, n - 1) ans += i + 2;
		cout << ans << endl;
	}
	
	return 0;
}

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

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

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

int main(){
	

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

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

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

    
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }


int n;

int main() {
    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, n && cin.eof()) {
		cout << 0.5 * n * (n + 1) << endl;
	}
}

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

int main(void) {
    int r[10000] = {2}, n;
	for (int i = 2; i <= 10000; ++i) r[i-1] = r[i-2]+i;

	while (cin >> n) {
	    cout << r[n-1] << endl;
	}
	return 0;
}