#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
  

int main() {
  int N; cin >> N;
  cout << (N-1)*(N-1) << endl;
}