package no276; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long n = sc.nextInt(); System.out.println(gcd(n,n * (n+1) / 2)); } public static long gcd(long a,long b) { while(b!=0) { long r = a%b; a = b; b = r; } return a; } }