import math def main(): n = int(input()) if n > 10 and n % 2 == 0: n //= 2 for i in range(3, int(math.sqrt(n)) + 3): if n % i == 0: print(i) return print(n) if __name__ == '__main__': main()