#include using namespace std; template T gcd(T a,T b){ if(a%b==0)return b; else return gcd(b,a%b); } int main(){ long long n;cin>>n; cout << gcd(n*(n-1),n) << endl; }