#P17637. [ICPC 2019 Yinchuan R] Function!
[ICPC 2019 Yinchuan R] Function!
Problem Description
Define the function
for all .
You are asked to calculate the value of
$$\sum_{a=2}^n \left( a \sum_{b=a}^n \lfloor f_{a}^{-1}(b) \rfloor \lceil f_{b}^{-1}(a) \rceil \right)$$where is the inverse function of , is the largest integer that is less than or equal to , and is the smallest integer that is greater than or equal to .
Since the value could be very large, please output the value modulo .
Input Format
An integer described above.
Output Format
An integer denotes the value you have calculated modulo .
2
2
10
236