#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define rep(i,n) Rep(i,0,n) #define Rep(i,k,n) for(int i=k ; i #define vii vector> #define mii map #define Sort(v) sort(v.begin(),v.end()) #define Reverse(v) reverse(v.begin(),v.end()) #define ALL(a) (a).begin(),(a).end() #define pb push_back #define mp make_pair //#define int ll typedef long long ll; const int md = 1000000007; const int INF = 1<<30; using namespace std; int main(){ int n; cin >> n; int ans = 0; rep1(i,n){ ans += i; } cout << ans << endl; }