N = int(input()) i2 = 0 k2 = N while k2 != 0: k2 //= 2 i2 += 1 i3 = 0 k3 = N while k3 != 0: k3 //= 3 i3 += 1 print(min(i2,i3))