Problem Statement
Find displaystylesuma=1Ksumb=1Ksumc=1Kgcd(a,b,c).
Here gcd(a,b,c) denotes the greatest common divisor of a, b, and c.
Constraints
- 1leqKleq200
- K is an integer.
Input is given from Standard Input in the following format:
K
Output
Print the value of displaystylesuma=1Ksumb=1Ksumc=1Kgcd(a,b,c).
Sample Output 1
gcd(1,1,1)+gcd(1,1,2)+gcd(1,2,1)+gcd(1,2,2) +gcd(2,1,1)+gcd(2,1,2)+gcd(2,2,1)+gcd(2,2,2) 1ˉ+1+1+1+1+1+1+2=9
Thus, the answer is 9.
Sample Output 2