#P6581. 远大目标
远大目标
Background
As everyone knows, the loftiest goal of an OIer is to get AK at IOI.

(Image from “From Beginner to Pro: Programming Contest Basics”.)
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|<|O| to encourage himself.
However, the expert Youyou saw it and felt it was ridiculous, saying: With your level you still want to AK IOI? Fine, since you said |A|<|O|, I will give you a problem to do.
Poor Little Z is really too weak and cannot solve even this problem, so he has to ask you for help—the future IOI AKer.
Problem Description
Given , find the number of integers such that .
Since Little Z is too weak, he does not even dare to say |A|<|O|, and can only study the problem |A|<O.
Input Format
One line with one integer .
Output Format
One line with one integer: the number of integers that satisfy the condition.
3
5
1145141919810
2290283839619
12345
24689
Hint
Sample 1 Explanation
Possible values of are , , and .
Constraints
- Subtask 1 (30 points): ;
- Subtask 2 (60 points): ;
- Subtask 3 (10 points): .
denotes the absolute value of .
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
Translated by ChatGPT 5