P6581 Lofty Goal

Background

As everyone knows, the loftiest goal of an OIer is to get AK at IOI. ![](https://cdn.luogu.com.cn/upload/image_hosting/81f0x6hi.png) (Image from [“From Beginner to Pro: Programming Contest Basics”](https://class.luogu.com.cn/course/lgbook1).) As an OIer, Little Z also wants to AK IOI. But he is still too weak: even saying `I AK IOI` would make the top players look down on him. So, Little Z can only say `|A|

Description

Given $O$, find the number of integers $A$ such that $|A|

Input Format

One line with one integer $O$.

Output Format

One line with one integer: the number of integers $A$ that satisfy the condition.

Explanation/Hint

**Sample 1 Explanation** Possible values of $A$ are $-1$, $0$, and $1$. **Constraints** * Subtask 1 (30 points): $0 \le |O| \le 2^{10}-1$; * Subtask 2 (60 points): $0 \le |O| \le 2^{31}-1$; * Subtask 3 (10 points): $0 \le |O| \le 2^{63}-1$. $|O|$ denotes the absolute value of $O$. **Hint** If you do not know what absolute value is, you can understand it as: $$|x| = \begin{cases} x & (x > 0) \\ 0 & (x = 0) \\ -x & (x < 0)\end{cases}$$ Original idea: [Meatherm](https://www.luogu.com.cn/user/108949) Translated by ChatGPT 5