B. Max Difference
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

As an avid watcher of the Iditarod Trail Sled Dog Race, you've decided that you want to enter your dog in the next contest. Every dog that races gets a number assigned to them. Given that your dog has received the number $$$n$$$ $$$(1 \leq n \leq 10^5)$$$, what is the maximum difference between any two permutations of $$$n$$$?

Input

The first and only line of input will contain $$$n$$$ $$$(1 \leq n \leq 10^5)$$$.

Output

Return the maximum difference between any two permutations of $$$n$$$.

Example
Input
4284
Output
5994