def pong(n): i = n - 1 while n % i: i -= 1 return i bounce = 1 def ping(n): global bounce if n > 1: bounce += 1 return ping(pong(n)) return bounce n = int(input()) print(ping(n))