use integer;
$N=<>;
exit!print 0if$N==1;
$%=$N;
$i=1;
while($i<$N-$i){
	$%+=$i*($N-$i);
	$%+=($N-$i+1)*($i+1);
	++$i
}
print$%+!($N%2)*$N/2*($N/2+1)