#include<stdio.h>
#include<conio.h>

int main()
{
	clrscr();
	int S=0,K,N;
	printf("Enter the value of N = ");
	scanf("%d", &N);
	
	for(K=1;K<=N;K++)
		S = S + K*K;
	
	printf("Total = %d\n",S);
	getch();
}