import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); final int N = sc.nextInt(); final int K = sc.nextInt(); for(int i = N - 1; i >= 1; i--){ if(N % i != 0){ continue; } System.out.println(i); break; } } }