def rr(): return input().rstrip()
def rri(): return int(rr())
def rrl(): return list(map(int, rr().split()))
def rrt(): return tuple(map(int, rr().split()))
from collections import defaultdict
def mus(d=0): return defaultdict(defaultdict(d))
def ms(x, y, d=0): return [[0]*y for i in range(x)]
def ar(x, d=0): return [d]*x
def ppm(m, n=0, x=0, y=0): print("\n".join(("\t".join((str(m[j][i]) for j in range(y or n))) for i in range(x or n))))
def ppa(a, n): print("\t".join(map(str, a[0:n])))
def ppl(a=0, x=[1]): x[0]=a or (x[0]+1); print("-"+"- -"*14+"-# "+str(x[0]-2)+" #-"+"- -"*14+"-")
def yn(x): return "YES" if x else "NO"
#from itertools import accumulate
#import math
import subprocess

def factorize(num):
    out = subprocess.Popen(['factor', str(num)], 
           stdout=subprocess.PIPE, 
           stderr=subprocess.PIPE)
    out, _ = out.communicate()
    _, factors = str(out).split(":")
    factors = factors.replace("\\n'", '')
    print(factors)
    return map(int, factors.strip().split())

def read():
    return rri()

def solve(x):
    f = list(factorize(x))
    a = min(f)
    b = x / a
    return ___

if __name__ == "__main__":
    #test_count = rri()
    test_count = 0
    for _ in range(test_count):
        input_data = read()
        result = solve(*input_data)
        ppl()
        print(result)
