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