



'''simple docstring'''





import logging
import os
import threading
import time


try:
       import warnings
except ImportError:
       __a  			=						None

try:
       import msvcrt
except ImportError:
       __a  			=						None

try:
       import fcntl
except ImportError:
       __a  			=						None


# Backward compatibility
# ------------------------------------------------
try:
       TimeoutError
except NameError:
       __a  			=						OSError


# Data
# ------------------------------------------------
__a  			=						[
    "Timeout",
    "BaseFileLock",
    "WindowsFileLock",
    "UnixFileLock",
    "SoftFileLock",
    "FileLock",
]

__a  			=						"3.0.12"


__a  			=						None





def 		__snake_case(							)						->					int:
      global _logger
      snake_case__    :       List[str]       		= _logger or logging.getLogger(__name__						)
      return _logger







class        UpperCAmelCase_			(			_a      ):
    """simple docstring"""







    def __init__(       self   :	Optional[Any]					,	snake_case_   :	List[str]		):
          snake_case__    :       List[str]       		= lock_file
          return None




    def __str__(       self   :	Union[str, Any]		):
          snake_case__    :       Union[str, Any]       		= f"The file lock '{self.lock_file}' could not be acquired."
          return temp







class        UpperCAmelCase_			:
    """simple docstring"""







    def __init__(       self   :	str					,	snake_case_   :	List[Any]		):
          snake_case__    :       Tuple       		= lock
          return None




    def __enter__(       self   :	int		):
          return self.lock




    def __exit__(       self   :	List[Any]					,	snake_case_   :	Any					,	snake_case_   :	Optional[Any]					,	snake_case_   :	Any		):
          self.lock.release()
          return None







class        UpperCAmelCase_			:
    """simple docstring"""







    def __init__(       self   :	List[Any]					,	snake_case_   :	Dict					,	snake_case_   :	List[Any]=-1					,	snake_case_   :	List[Any]=None		):
          snake_case__    :       Optional[Any]       		= max_filename_length if max_filename_length is not None else 255
          # Hash the filename if it's too long
          snake_case__    :       Union[str, Any]       		= self.hash_filename_if_too_long(snake_case_					,	snake_case_		)
          # The path to the lock file.
          snake_case__    :       str       		= lock_file

          # The file descriptor for the *_lock_file* as it is returned by the
          # os.open() function.
          # This file lock is only NOT None, if the object currently holds the
          # lock.
          snake_case__    :       Dict       		= None

          # The default timeout value.
          snake_case__    :       List[str]       		= timeout

          # We use this lock primarily for the lock counter.
          snake_case__    :       Optional[int]       		= threading.Lock()

          # The lock counter is used for implementing the nested locking
          # mechanism. Whenever the lock is acquired, the counter is increased and
          # the lock is only released, when this value is 0 again.
          snake_case__    :       List[Any]       		= 0
          return None




    @property
    def lowerCamelCase			(       self   :	Dict		):
          return self._lock_file




    @property
    def lowerCamelCase			(       self   :	List[str]		):
          return self._timeout




    @timeout.setter
    def lowerCamelCase			(       self   :	Any					,	snake_case_   :	List[str]		):
          snake_case__    :       Dict       		= float(snake_case_		)
          return None




    def lowerCamelCase			(       self   :	str		):
          raise NotImplementedError()




    def lowerCamelCase			(       self   :	Optional[int]		):
          raise NotImplementedError()




    @property
    def lowerCamelCase			(       self   :	Any		):
          return self._lock_file_fd is not None




    def lowerCamelCase			(       self   :	Tuple					,	snake_case_   :	List[str]=None					,	snake_case_   :	Any=0.05		):
          # Use the default timeout, if no timeout is provided.
          if timeout is None:
                snake_case__    :       Union[str, Any]       		= self.timeout

          # Increment the number right at the beginning.
          # We can still undo it, if something fails.
          with self._thread_lock:
                self._lock_counter += 1

          snake_case__    :       Dict       		= id(self		)
          snake_case__    :       Dict       		= self._lock_file
          snake_case__    :       Dict       		= time.time()
          try:
                while True:
                      with self._thread_lock:
                            if not self.is_locked:
                                  logger().debug(f"Attempting to acquire lock {lock_id} on {lock_filename}"		)
                                  self._acquire()

                      if self.is_locked:
                            logger().debug(f"Lock {lock_id} acquired on {lock_filename}"		)
                            break
                      elif timeout >= 0 and time.time() - start_time > timeout:
                            logger().debug(f"Timeout on acquiring lock {lock_id} on {lock_filename}"		)
                            raise Timeout(self._lock_file		)
                      else:
                            logger().debug(
                                f"Lock {lock_id} not acquired on {lock_filename}, waiting {poll_intervall} seconds ..."		)
                            time.sleep(snake_case_		)
          except:  # noqa
                # Something did go wrong, so decrement the counter.
                with self._thread_lock:
                      snake_case__    :       Tuple       		= max(0					,	self._lock_counter - 1		)

                raise
          return _Acquire_ReturnProxy(lock=self		)




    def lowerCamelCase			(       self   :	Union[str, Any]					,	snake_case_   :	List[str]=False		):
          with self._thread_lock:
                if self.is_locked:
                      self._lock_counter -= 1

                      if self._lock_counter == 0 or force:
                            snake_case__    :       List[str]       		= id(self		)
                            snake_case__    :       Any       		= self._lock_file

                            logger().debug(f"Attempting to release lock {lock_id} on {lock_filename}"		)
                            self._release()
                            snake_case__    :       Union[str, Any]       		= 0
                            logger().debug(f"Lock {lock_id} released on {lock_filename}"		)

          return None




    def __enter__(       self   :	int		):
          self.acquire()
          return self




    def __exit__(       self   :	int					,	snake_case_   :	Any					,	snake_case_   :	Tuple					,	snake_case_   :	Optional[Any]		):
          self.release()
          return None




    def __del__(       self   :	Optional[Any]		):
          self.release(force=snake_case_		)
          return None




    def lowerCamelCase			(       self   :	str					,	snake_case_   :	str					,	snake_case_   :	int		):
          snake_case__    :       str       		= os.path.basename(snake_case_		)
          if len(snake_case_		) > max_length and max_length > 0:
                snake_case__    :       List[str]       		= os.path.dirname(snake_case_		)
                snake_case__    :       str       		= str(hash(snake_case_		)		)
                snake_case__    :       List[str]       		= filename[: max_length - len(snake_case_		) - 8] + """...""" + hashed_filename + """.lock"""
                return os.path.join(snake_case_					,	snake_case_		)
          else:
                return path







class        UpperCAmelCase_			(			_a      ):
    """simple docstring"""







    def __init__(       self   :	Optional[int]					,	snake_case_   :	Optional[Any]					,	snake_case_   :	Optional[Any]=-1					,	snake_case_   :	str=None		):
          from .file_utils import relative_to_absolute_path

          super().__init__(snake_case_					,	timeout=snake_case_					,	max_filename_length=snake_case_		)
          snake_case__    :       Optional[int]       		= """\\\\?\\""" + relative_to_absolute_path(self.lock_file		)




    def lowerCamelCase			(       self   :	List[Any]		):
          snake_case__    :       List[str]       		= os.O_RDWR | os.O_CREAT | os.O_TRUNC

          try:
                snake_case__    :       Optional[Any]       		= os.open(self._lock_file					,	snake_case_		)
          except OSError:
                pass
          else:
                try:
                      msvcrt.locking(snake_case_					,	msvcrt.LK_NBLCK					,	1		)
                except OSError:
                      os.close(snake_case_		)
                else:
                      snake_case__    :       Tuple       		= fd
          return None




    def lowerCamelCase			(       self   :	Tuple		):
          snake_case__    :       Optional[int]       		= self._lock_file_fd
          snake_case__    :       Dict       		= None
          msvcrt.locking(snake_case_					,	msvcrt.LK_UNLCK					,	1		)
          os.close(snake_case_		)

          try:
                os.remove(self._lock_file		)
          # Probably another instance of the application
          # that acquired the file lock.
          except OSError:
                pass
          return None







class        UpperCAmelCase_			(			_a      ):
    """simple docstring"""







    def __init__(       self   :	str					,	snake_case_   :	Dict					,	snake_case_   :	Union[str, Any]=-1					,	snake_case_   :	int=None		):
          snake_case__    :       int       		= os.statvfs(os.path.dirname(snake_case_		)		).f_namemax
          super().__init__(snake_case_					,	timeout=snake_case_					,	max_filename_length=snake_case_		)




    def lowerCamelCase			(       self   :	str		):
          snake_case__    :       Optional[Any]       		= os.O_RDWR | os.O_CREAT | os.O_TRUNC
          snake_case__    :       Any       		= os.open(self._lock_file					,	snake_case_		)

          try:
                fcntl.flock(snake_case_					,	fcntl.LOCK_EX | fcntl.LOCK_NB		)
          except OSError:
                os.close(snake_case_		)
          else:
                snake_case__    :       Tuple       		= fd
          return None




    def lowerCamelCase			(       self   :	Tuple		):
          # Do not remove the lockfile:
          #
          #   https://github.com/benediktschmitt/py-filelock/issues/31
          #   https://stackoverflow.com/questions/17708885/flock-removing-locked-file-without-race-condition
          snake_case__    :       Optional[Any]       		= self._lock_file_fd
          snake_case__    :       Tuple       		= None
          fcntl.flock(snake_case_					,	fcntl.LOCK_UN		)
          os.close(snake_case_		)
          return None







class        UpperCAmelCase_			(			_a      ):
    """simple docstring"""







    def lowerCamelCase			(       self   :	Optional[int]		):
          snake_case__    :       int       		= os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC
          try:
                snake_case__    :       Tuple       		= os.open(self._lock_file					,	snake_case_		)
          except OSError:
                pass
          else:
                snake_case__    :       Union[str, Any]       		= fd
          return None




    def lowerCamelCase			(       self   :	Dict		):
          os.close(self._lock_file_fd		)
          snake_case__    :       Any       		= None

          try:
                os.remove(self._lock_file		)
          # The file is already deleted and that's what we want.
          except OSError:
                pass
          return None
__a  			=						None

if msvcrt:
       __a  			=						WindowsFileLock
elif fcntl:
       __a  			=						UnixFileLock
else:
       __a  			=						SoftFileLock

       if warnings is not None:
              warnings.warn("only soft file lock is available")





'''simple docstring'''





import sys

__a  			=						(
    "73167176531330624919225119674426574742355349194934"
    "96983520312774506326239578318016984801869478851843"
    "85861560789112949495459501737958331952853208805511"
    "12540698747158523863050715693290963295227443043557"
    "66896648950445244523161731856403098711121722383113"
    "62229893423380308135336276614282806444486645238749"
    "30358907296290491560440772390713810515859307960866"
    "70172427121883998797908792274921901699720888093776"
    "65727333001053367881220235421809751254540594752243"
    "52584907711670556013604839586446706324415722155397"
    "53697817977846174064955149290862569321978468622482"
    "83972241375657056057490261407972968652414535100474"
    "82166370484403199890008895243450658541227588666881"
    "16427171479924442928230863465674813919123162824586"
    "17866458359124566529476545682848912883142607690042"
    "24219022671055626321111109370544217506941658960408"
    "07198403850962455444362981230987879927244284909188"
    "84580156166097919133875499200524063689912560717606"
    "05886116467109405077541002256983155200055935729725"
    "71636269561882670428252483600823257530420752963450"
)





def 		__snake_case(							_lowerCAmelCase = N						)						->					int:
      snake_case__    :       Dict       		= -sys.maxsize - 1
      for i in range(len(_lowerCAmelCase						) - 12						):
            snake_case__    :       Any       		= 1
            for j in range(13						):
                  product *= int(n[i + j]						)
            if product > largest_product:
                  snake_case__    :       List[str]       		= product
      return largest_product


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