#include <bits/stdc++.h>
using namespace std;
int main(){
int k=0,o=1,l;
cin>>k;
int a=1;
while(l>=k){
a=a*o;
a+1;
o=a*k;
}cout<<a;
return 0;
}
/**************************************************************
Problem: 1004
User: tonghuawei
Language: C++
Result: Wrong Answer
****************************************************************/