import java.util.Scanner; public class N136 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(),k=sc.nextInt(); int i=2; int ans=0; while(true){ if(n%i==0){ ans=n/i; break; } i++; } System.out.println(ans); } }