import math

print((math.ceil(math.log(int(eval(input())))/math.log(3))))
import math

print((math.ceil(math.log(int(eval(input())),3))))
import math

print((math.ceil(math.log(int(eval(input()))) / math.log(3))))

import math

print((math.ceil(math.log(int(eval(input())), 3))))

-print((math.ceil(math.log(int(eval(input()))) / math.log(3)))) +print((math.ceil(math.log(int(eval(input())), 3))))