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