import java.io.ObjectInputStream.GetField; import java.net.NetworkInterface; import java.util.*; import java.util.zip.Inflater; import javax.swing.plaf.synth.SynthSpinnerUI; public class Main { static long gcd(long N, long N2){ if(N2==0) return N; else return gcd(N2, N%N2); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); System.out.println(gcd(N,N*(N-1)/2)); } }