#K86032. Sum of Cubes Modulo 10^9+7
Sum of Cubes Modulo 10^9+7
Sum of Cubes Modulo 10^9+7
You are given a positive integer n. Your task is to compute the sum of cubes of all integers from 1 to n modulo \(10^9+7\). It is known that the sum of cubes can be expressed in closed form as:
\(\left(\frac{n(n+1)}{2}\right)^2\)
Using this formula, compute the value \(\left(\frac{n(n+1)}{2}\right)^2 \bmod (10^9+7)\) and print the result.
inputFormat
The input consists of a single line containing one integer \(n\) (\(1 \le n \le 10^{18}\)).
outputFormat
Output a single integer which is the sum of cubes from 1 to \(n\) modulo \(10^9+7\).
## sample3
36