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