# BY : AMIRHOSSEIN HEIDARI
def greatest_divisor(number):
greatest = 1
for i in range (1, round(number/2)):
greatest = i
return greatest
num = int(input())
counter = 1
while num != 1:
counter += 1
num = greatest_divisor(num)
print(counter)