##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)
while True:
if not bool(receive % service):
break
service = next(potential_services)
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))