import math a=int(input()) score=a for m in range(1,math.ceil(math.log2(a))+1): n=math.ceil(a**(1/m)) if(n*m