<|instruction|>
Solve the below problem. The solution should start with an abridged problem statement. Then key observations. Then full solution based on the observations. Then C++ and Python implementations with comments.

403. Scientific Problem
Time limit per test: 0.25 second(s)
Memory limit: 65536 kilobytes
input: standard
output: standard



Once upon a time Professor Idioticideasinventor was travelling by train. Watching cheerless landscape outside the window, he decided to invent the theme of his new scientific work. All of a sudden a brilliant idea struck him: to develop an effective algorithm finding an integer number, which is x times less than the sum of all its integer positive predecessors, where number x is given. As far as he has no computer in the train, you have to solve this difficult problem.

Input
The first line of the input file contains an integer number x (1 ≤ x ≤ 109).

Output
Output an integer number — the answer to the problem.

Example(s)
sample input
sample output
1
3

sample input
sample output
2
5

<|response|>
1. Abridged Problem Statement
Given a positive integer x, find the smallest positive integer N such that the sum of all positive integers less than N is exactly x times N. In equation form:
 N = (1 + 2 + … + (N–1)) / x

2. Key Observations
- The sum of the first (N–1) positive integers is S = (N–1)·N / 2.
- We need S = x·N.
- Since N > 0, we can divide both sides by N, yielding (N–1)/2 = x.
- Solving for N gives N = 2·x + 1.

3. Full Solution Approach
Step 1. Read the integer x.
Step 2. Use the derived formula N = 2·x + 1.
Step 3. Output N.
This runs in O(1) time and uses O(1) memory, easily handling x up to 10^9.

4. C++ implementation with detailed comments
```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;
};

int64_t x;

void read() { cin >> x; }

void solve() {
    // We need an integer n whose positive predecessors 1..n-1 sum to x times
    // n, i.e. (n - 1) * n / 2 = x * n. Cancelling n gives n = 2 * x + 1.

    cout << x * 2 + 1 << '\n';
}

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

    read();
    solve();

    return 0;
}
```

5. Python implementation with detailed comments
```python
import sys

def main():
    # Read the integer x from standard input
    data = sys.stdin.read().strip()
    x = int(data)

    # From (N-1)*N/2 = x*N we get (N-1)/2 = x => N = 2*x + 1
    result = 2 * x + 1

    # Print the answer
    print(result)

if __name__ == "__main__":
    main()
```
