#P1740. Empty Parallelograms in a Diamond Grid

    ID: 15025 Type: Default 1000ms 256MiB

Empty Parallelograms in a Diamond Grid

Empty Parallelograms in a Diamond Grid

A large diamond with side length \( n \) is uniformly partitioned into \( n\times n \) small diamonds (each of side length 1). Due to some erased grid boundaries, not every segment of the grid is present. A parallelogram is considered empty if there is no remaining grid edge strictly inside it (i.e. its interior contains no grid line). In the ideal case when no edge is erased, the only parallelograms that satisfy this condition are the individual unit diamonds. Hence, the answer is \( n^2 \).

Given \( n \), compute the number of empty parallelograms in the grid.

Note: For this problem, assume the grid is complete (i.e. ignore the erased edges described in the story) so that the answer is simply \( n^2 \).

inputFormat

A single integer ( n ) (( 1 \le n \le 10^9 )) representing the side length of the large diamond grid.

outputFormat

Output a single integer: the number of empty parallelograms in the grid.

sample

1
1