
'''simple docstring'''





def 							snake_case				(		UpperCAmelCase						)->      bool:







      """simple docstring"""
      __A													=      9

      while num > 0:
            if num % 1_0 != digit:
                  return False
            num //= 1_0_0
            digit -= 1

      return True





def 							snake_case				(		)->      int:







      """simple docstring"""
      __A													=      1_3_8_9_0_2_6_6_3

      while not is_square_form(num * num						):
            if num % 1_0 == 3:
                  num -= 6  # (3 - 6) % 10 = 7
            else:
                  num -= 4  # (7 - 4) % 10 = 3

      return num * 1_0


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








'''simple docstring'''

def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	int							)       ->	int:
 if number != int(snake_case_							):
  raise ValueError('factorial() only accepts integral values'							)
 if number < 0:
  raise ValueError('factorial() not defined for negative values'							)
 SCREAMING_SNAKE_CASE  :  str								=		1
 for i in range(1   ,     number + 1							):
  value *= i
 return value



def        SCREAMING_SNAKE_CASE_  (	snake_case_				:	int							)       ->	int:
 if not isinstance(snake_case_   ,     snake_case_							):
  raise ValueError('factorial() only accepts integral values'							)
 if n < 0:
  raise ValueError('factorial() not defined for negative values'							)
 return 1 if n == 0 or n == 1 else n * factorial(n - 1							)


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   __UpperCAmelCase												=   int(input('Enter a positive integer: ').strip() or 0)
   print(f"""factorial{n} is {factorial(n)}""")


