N = int(input()) x, i = 2, 0 while N >= x**i: i += 1 exponent = max(0, i-1) if N == x**exponent: print(exponent) else: print(exponent+1)