##def pong(receive: int) -> int:
## potentialservice = receive - 1
## for service in range(potentialservice, 0, -1):
## print(service)
## if not bool(receive % service):
## return service
from math import sqrt
def pong(receive: int) -> int:
potential_services = iter(range(receive - 1, 0, -1))
service = next(potential_services)
potential_service = not bool(receive % service)
while True:
service = next(potential_services)
potential_service = not bool(receive % service)
if potential_service:
break
return service
bounce = 1
def ping(ball: int, bounce: int) -> int:
while ball > 1:
bounce += 1
ball = pong(ball)
return bounce
ball = int(input())
print(ping(ball, bounce))