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 <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

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

const int MAX_N = 10000;

int area[MAX_N+1];

void calc_area (void )
{
	memset (area, 0, sizeof (area ) );
	area[1] = 2;
	for (int i = 2; i <= MAX_N; i++ ){
		area[i] = i + area[i-1];
	} // end for
/*	
	rep (i, MAX_N + 1 )
		cerr << setw(6) << i << ": " << area[i] << endl;
*/
}

int main()
{
//	cut here before submit 
//	freopen ("testcase.area", "r", stdin );
	calc_area ();

	int n;
	while (scanf ("%d", &n ) != EOF ){
		cout << area[n] << endl;
	} // end loop
		
	return 0;
}

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

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

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

int max_area(int n)
{
  if (n == 1){
    return (2);
  }

  return (max_area(n - 1) + n); // before sum area + sum draw line
}

int main()
{
  int n;

  while (~scanf("%d", &n)){
    printf("%d\n", max_area(n));
  }

  return (0);
}

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

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

int main()
{
 int n;
 while(cin>>n)
 {
  if(n>2)
  {
   static_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>
int main(){for(int n;std::cin>>n;)std::cout<<n*(n+1)/2+1<<std::endl;}

C++: #include<iostream>
using namespace std;
int main(){
int T,Y;
cin>>T>>Y;
cout<<T+1<<endl;
cout<<(T+1)*(Y+1)-1<<endl;
return 0;
}

C++: #include<stdio.h>
int dp[10001]={0};

int inarea(int n)
{
    if(n <= 2)return 0;
    dp[n] = inarea(n-1)+n-2;
    return dp[n];
}

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

C++: #include<iostream>
#include<sstream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<set>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef map<string,int> dict;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
double eps = 1e-10 ;

template <typename T>
void out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
}

template<typename T>
string ntos( T i ) {
  ostringstream s ;
  s << i ;
  return s.str() ;
}

template<typename T>
T ston(string str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,ans;
  while(cin >> n){
    cout << (n*n+2+n)/2<< endl;
  }
  return 0;
}

C++: #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <utility>
#include <numeric>

using namespace std;
typedef long long llong;
typedef unsigned long long ullong;

const ullong MOD = 1000000000 + 7;

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

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	while(cin >> n)
	{
		int ans = 1;
		ans += n * (n + 1) / 2;
		cout << ans << endl;
	}
}

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

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

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

}

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

int main() {

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

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

int main(){
	int n;
	int sum = 2;
	int piyo = 2;
	cin >> n;
	for(int i=1; i<n; ++i){
		sum += piyo;
		piyo++;
	}
	cout << sum;
	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 func(int cnt){
	if(cnt==1)return 2;
	return cnt+func(cnt-1);
}

int main(){
	int num;
	while(cin>>num){
		cout<<func(num)<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

/** Problem0057 : The Number of Area **/
int main() {
	int in;
	while (cin >> in) {
		cout << (in*in + in + 2)/2 << endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main(){

int N;
int s=1;
while(scanf("%d",&N)!=EOF){
for(int i=0;i<=N;i++)
s+=i;
printf("%d\n",s);
s=1;
}
return 0;
}

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

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

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

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

C++: #define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#include <sstream>
#include <climits>
#include <map>
#include <stack>
using namespace std;
#define M_PI 3.141592
#define toRad 2.0*M_PI/360.0
#define inin(x) int x;cin>>x;
#define all(x) x.begin(),x.end()
#define debug(x) cout<<#x<<" "<<x<<endl;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define pri_max 60000
typedef pair<int, int> pii;
/*
bool memo[pri_max] = {};
vector<int> pri;
void calc()
{
	for (int i = 2; i < pri_max; i++)
	{
		if (memo[i] == false)
		{
			pri.push_back(i);
			for (int l = i; l < pri_max; l += i)
			{
				memo[l] = true;
			}
		}
	}
}*/
int main()
{
	int n;
	while (cin >> n)
	{
		int ans = 1;
		for (int i = 1; i <= n; i++)
		{
			ans += i;
		}
		cout << ans << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
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;
	}
}