#include int n; int ans; int main(void){ scanf("%d",&n); for (int i=1; i <= n; i++){ ans = n*(n-1); n = n-1; } printf("%d \n",ans); return 0; }