#include<stdio.h>
int main () {
int n,num;
while(scanf("%d",&n) != EOF) {
num = n*n - n + 2;
printf("%d\n",num);
}
return 0;