10495 - Midterm Practice Count Square   

Description

 The following is a 2 × 2 square, which consists of five different-size squares: four 1 × 1 squares and one 2 × 2 square.

 

If you are given an N × N square, can you write a C program to calculate the total number of squares contained in this given square?

Input

There are several lines, each of which represents the size N of a square (1 <= N <= 1860). Your program should terminate when 0 is encountered.

Output

For every given square size, your program should print the corresponding square amount followed by a new line character.

Sample Input  Download

Sample Output  Download

Tags




Discuss