import java.io.*; import java.util.*; import java.math.*; class Main { public static void out (Object o) { System.out.println(o); } public static long gcd (long m , long 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)); long n = Long.parseLong(br.readLine()); out(gcd(n * (n - 1) / 2 , n)); } }