import java.io.*; import java.util.*; import java.math.*; class Main { public static void out (Object o) { System.out.println(o); } public static int gcd (int m , int n) { return n == 0 ? m : gcd(n , m % n); } public static void main (String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); out(gcd(n * (n - 1) / 2 , n)); } }