100 atcoder#ABC139D. [ABC139D] ModSum
[ABC139D] ModSum
Score : points
Problem Statement
For an integer , we will choose a permutation of .
Then, for each , let be the remainder when is divided by .
Find the maximum possible value of .
Constraints
- is an integer satisfying .
Input
Input is given from Standard Input in the following format:
Output
Print the maximum possible value of .
2
1
When the permutation is chosen, .
13
78
1
0