#include <iostream>
using namespace std;
int main() {
int n,c;
cin>>n;
c=(n-1)*(n-2);
cout<<c;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJaW50IG4sYzsKCWNpbj4+bjsKCWM9KG4tMSkqKG4tMik7CiAgICBjb3V0PDxjOwoJcmV0dXJuIDA7Cn0=