# coding: utf-8 #yuki_136 n,k=map(int,raw_input().split()) res=1 for i in xrange(2,n+1): if n%i==0: res=max(res,n/i) print res