#include<iostream>
using namespace std;
int main()
{
int d;
while(cin>>d)
{
int sum=0;
int a=2;
while(d--)
{
sum+=a;
a+=3;
}
cout<<sum<<endl;
}
}
#include<iostream>
using namespace std;
int main()
{
int d;
while(cin>>d)
{
int sum=0;
int a=2;
while(d--)
{
sum+=a;
a+=3;
}
cout<<sum<<endl;
}
}