import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long min = Long.MAX_VALUE; for (long i = 1; ;i++) { long x = (long)Math.ceil(Math.pow(a, 1.0 / i)); min = Math.min(min, x * i); if (i * i > a) { break; } } System.out.println(min); } }