using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace zn
{
class Program
static void Main(string[] args)
int _sum = 0;
int n = Convert.ToInt32(Console.ReadLine());
for (int k = 1; k <= n; k++)
_sum += Convert.ToInt32(Math.Pow(k, k));
}
Console.WriteLine(_sum);
Console.ReadKey();
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace zn
{
class Program
{
static void Main(string[] args)
{
int _sum = 0;
int n = Convert.ToInt32(Console.ReadLine());
for (int k = 1; k <= n; k++)
{
_sum += Convert.ToInt32(Math.Pow(k, k));
}
Console.WriteLine(_sum);
Console.ReadKey();
}
}
}