def count_square(n):
count = 0
# For all odd values of i
for i in range(1, n + 1, 2):
# Add the count of possible
# squares of length i
k = n - i + 1
count += (k * k)
# Return the required count
return count
# Driver code
N = int(input())
print(count_square(N))
To embed this program on your website, copy the following code and paste it into your website's HTML: