

import math




def        lowerCAmelCase(	SCREAMING_SNAKE_CASE_       )->		bool:



    """simple docstring"""






    if 1 < number < 4:
        # 2 and 3 are primes
        return True
    elif number < 2 or number % 2 == 0 or number % 3 == 0:
        # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
        return False

    # All primes number are in format of 6k +/- 1
    for i in range(5       ,		int(math.sqrt(SCREAMING_SNAKE_CASE_       ) + 1       )       ,		6       ):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True




def        lowerCAmelCase(	SCREAMING_SNAKE_CASE_ = 6_0_0_8_5_1_4_7_5_1_4_3       )->		int:



    """simple docstring"""






    try:
        UpperCamelCase_          =		int(SCREAMING_SNAKE_CASE_       )
    except (TypeError, ValueError):
        raise TypeError("Parameter n must be int or castable to int."       )
    if n <= 0:
        raise ValueError("Parameter n must be greater than or equal to one."       )
    UpperCamelCase_          =		0
    if is_prime(SCREAMING_SNAKE_CASE_       ):
        return n
    while n % 2 == 0:
        n //= 2
    if is_prime(SCREAMING_SNAKE_CASE_       ):
        return n
    for i in range(3       ,		int(math.sqrt(SCREAMING_SNAKE_CASE_       )       ) + 1       ,		2       ):
        if n % i == 0:
            if is_prime(n // i       ):
                UpperCamelCase_          =		n // i
                break
            elif is_prime(SCREAMING_SNAKE_CASE_       ):
                UpperCamelCase_          =		i
    return max_number


if __name__ == "__main__":
 print(F'''{solution() = }''')








"""simple docstring"""







def 						lowercase__(A = 1_000						)				->int:




						"""simple docstring"""



						lowercase__				:      Any=       [0, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8]
						# number of letters in twenty, thirty, ..., ninety (0 for numbers less than
						# 20 due to inconsistency in teens)
						lowercase__				:      List[str]=       [0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

						lowercase__				:      Dict=       0

						for i in range(1					,		n + 1						):
												if i < 1_000:
																		if i >= 100:
																								# add number of letters for "n hundred"
																								count += ones_counts[i // 100] + 7

																								if i % 100 != 0:
																														# add number of letters for "and" if number is not multiple
																														# of 100
																														count += 3

																		if 0 < i % 100 < 20:
																								# add number of letters for one, two, three, ..., nineteen
																								# (could be combined with below if not for inconsistency in
																								# teens)
																								count += ones_counts[i % 100]
																		else:
																								# add number of letters for twenty, twenty one, ..., ninety
																								# nine
																								count += ones_counts[i % 10]
																								count += tens_counts[(i % 100 - i % 10) // 10]
												else:
																		count += ones_counts[i // 1_000] + 8
						return count


if __name__ == "__main__":
			print(solution(int(input().strip())))






