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

C++: #include<string>
#include<vector>
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<functional>
#include<algorithm>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<utility>
#include<cmath>
#include<ctime>
#include<complex>

using namespace std;

#define REP(i,s,e) for(int i=int(s);i<=int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)



int main(){

    vector<int>s;
	int n;
	while(cin >> n){

	s.push_back(0);
	s.push_back(2);

	REP(i,2,n)
	s.push_back(s[i-1]+i);

	cout << s.back() << endl;

    s.clear();

	}

	return 0;
}

C++: #include <iostream>

int main()
{
	int n;
	while(std::cin >> n)
	{
		std::cout << (1<<n)-1 << std::endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int dp[10001];
int main(){
  dp[1]=2;
  for(int i=2;i<10001;i++){
    dp[i] = dp[i-1] + i;
  }
  int n;
  while(cin>>n){
    cout<<dp[n]<<endl;
  }
}