#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
#include <bits/stdc++.h>
int main() {
int n;
cin>>n;
int sum=0;
for(int i=1;i<=n;i++)
{
sum+=i*i;
}
cout<<"The total is: "<<sum<<endl;
for(int j=0;j<=50000;j++)
{
int du=j%10;
int tongcacso=j%10*j%10*j%10;
cout<<"du="<<du<<endl;
sum=sum+du*du*du;
cout<<"\nsum= "<<sum<<endl;
cout<<"sum= (sum+j*j*j) "<<endl;
}
return 0;
}