p135.ans1
======================
1

=================
p135.ans2
======================
2

=================
p135.cpp
======================
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

int n;

void read() { cin >> n; }

void solve() {
    /*
     * Each new line crosses all previous lines in distinct points, adding one
     * more region than the (k-1) it crosses, i.e. the k-th line adds k regions.
     * Summing from the initial single region gives the maximum
     * 1 + 1 + 2 + ... + n = 1 + n(n+1)/2.
     */

    int64_t answer = 1 + (int64_t)n * (n + 1) / 2;
    cout << answer << '\n';
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}

=================
p135.in1
======================
0

=================
p135.in2
======================
1

=================
statement.txt
======================
135. Drawing Lines

time limit per test: 0.25 sec.
memory limit per test: 4096 KB


Little Johnny likes to draw a lot. A few days ago he painted lots of straight lines on his sheet of paper. Then he counted in how many zones the sheet of paper was split by these lines. He noticed that this number is not always the same. For instance, if he draws 2 lines, the sheet of paper could be split into 4, 3 or even 2 (if the lines are identical) zones. Since he is a very curious kid, he would like to know which is the maximum number of zones into which he can split the sheet of paper, if he draws N lines. The sheet of paper is to be considered a very large (=infinite) rectangle.


Input

The input file will contain an integer number: N (0<=N<=65535).


Output

You should output one integer: the maximum number of zones into which the sheet of paper can be split if Johnny draws N lines.


Sample Input #1

0
Sample Output #1

1
Sample Input #2

1
Sample Output #2

2
Author	: Mugurel Ionut Andreica
Resource	: SSU::Online Contester Fall Contest #2
Date	: Fall 2002


=================
