#include<stdio.h>
int main()
{
freopen("chess_2016.in","r",stdin);
freopen("chess_2016.out","w",stdout);
int i;
int n;//边长
long long a[205]={0};//融斥阶乘
long long c[205]={0};//融斥次数
long long x=0;//结果
scanf("%d",&n);
a[0]=1;
for(i=1;i<=n;i++)
a[i]=a[i-1]*i;
for(i=1;i<=n;i++)
c[i]=a[n]/a[i]/a[n-i];
x=a[n];
for(i=1;i<=n;i++)
if(i%2==1)
x-=a[n-i]*c[i];
else
x+=a[n-i]*c[i];
printf("%lld",x);
return 0;
}