using System;
using System.Collections.Generic;
using System.Text;
namespace Text
{
class Program
{
static void Main(string[] args)
{
Program p = new Program();
Console .WriteLine (p.GetSum(3));
}
private int GetSum(int x)
{
int sum = 0;
for (int i = 1; i <= x; i++)
{
int t = 1;
for (int j = 1; j <= i; j++)
{
t = t * j;
}
sum += t;
}
return sum;
}
}
}