


import logging
import os
from logging import (
    CRITICAL,  # NOQA
    DEBUG,  # NOQA
    ERROR,  # NOQA
    FATAL,  # NOQA
    INFO,  # NOQA
    NOTSET,  # NOQA
    WARN,  # NOQA
    WARNING,  # NOQA
)
from typing import Optional

from tqdm import auto as tqdm_lib


SCREAMING_SNAKE_CASE						:List[str]			=  {
    '''debug''': logging.DEBUG,
    '''info''': logging.INFO,
    '''warning''': logging.WARNING,
    '''error''': logging.ERROR,
    '''critical''': logging.CRITICAL,
}

SCREAMING_SNAKE_CASE						:Tuple			=  logging.WARNING



def       _lowerCAmelCase    (				)->Optional[int]:
   '''simple docstring'''






   snake_case_            =       os.getenv("DATASETS_VERBOSITY"		,    lowerCAmelCase_				)
   if env_level_str:
      if env_level_str in log_levels:
         return log_levels[env_level_str]
      else:
         logging.getLogger().warning(
             F'''Unknown option DATASETS_VERBOSITY={env_level_str}, '''
             F'''has to be one of: { ', '.join(log_levels.keys()				) }'''				)
   return _default_log_level



def       _lowerCAmelCase    (				)->str:
   '''simple docstring'''






   return __name__.split("."				)[0]



def       _lowerCAmelCase    (				)->logging.Logger:
   '''simple docstring'''






   return logging.getLogger(_get_library_name()				)



def       _lowerCAmelCase    (				)->None:
   '''simple docstring'''






   snake_case_            =       _get_library_root_logger()
   library_root_logger.setLevel(_get_default_logging_level()				)



def       _lowerCAmelCase    (				)->None:
   '''simple docstring'''






   snake_case_            =       _get_library_root_logger()
   library_root_logger.setLevel(logging.NOTSET				)



def       _lowerCAmelCase    (				lowerCAmelCase_				:Optional[str] = None				)->logging.Logger:
   '''simple docstring'''






   if name is None:
      snake_case_            =       _get_library_name()
   return logging.getLogger(lowerCAmelCase_				)



def       _lowerCAmelCase    (				)->int:
   '''simple docstring'''






   return _get_library_root_logger().getEffectiveLevel()



def       _lowerCAmelCase    (				lowerCAmelCase_				:int				)->None:
   '''simple docstring'''






   _get_library_root_logger().setLevel(lowerCAmelCase_				)



def       _lowerCAmelCase    (				)->Union[str, Any]:
   '''simple docstring'''






   return set_verbosity(lowerCAmelCase_				)



def       _lowerCAmelCase    (				)->Optional[Any]:
   '''simple docstring'''






   return set_verbosity(lowerCAmelCase_				)



def       _lowerCAmelCase    (				)->Any:
   '''simple docstring'''






   return set_verbosity(lowerCAmelCase_				)



def       _lowerCAmelCase    (				)->Optional[Any]:
   '''simple docstring'''






   return set_verbosity(lowerCAmelCase_				)



def       _lowerCAmelCase    (				)->None:
   '''simple docstring'''






   snake_case_            =       False



def       _lowerCAmelCase    (				)->None:
   '''simple docstring'''






   snake_case_            =       True


# Configure the library root logger at the module level (singleton-like)
_configure_library_root_logger()


class      __lowerCAmelCase  :






  """simple docstring"""





  def __init__(  self							:							Union[str, Any]     ,					*_lowerCAmelCase							:							List[str]     ,					**_lowerCAmelCase							:							Dict	) ->			Optional[Any]:  # pylint: disable=unused-argument




     """simple docstring"""
     snake_case_            =       args[0] if args else None



  def __iter__(  self							:							List[str]	) ->			List[str]:




     """simple docstring"""
     return iter(self._iterator	)



  def __getattr__(  self							:							Tuple     ,					_lowerCAmelCase							:							Any	) ->			int:




     """simple docstring"""

     def empty_fn(*_lowerCAmelCase							:							str     ,					**_lowerCAmelCase							:							List[str]	):  # pylint: disable=unused-argument
        return

     return empty_fn



  def __enter__(  self							:							int	) ->			Optional[Any]:




     """simple docstring"""
     return self



  def __exit__(  self							:							int     ,					_lowerCAmelCase							:							int     ,					_lowerCAmelCase							:							int     ,					_lowerCAmelCase							:							int	) ->			str:




     """simple docstring"""
     return






SCREAMING_SNAKE_CASE						:Optional[int]			=  True


class      __lowerCAmelCase  :






  """simple docstring"""





  def __call__(  self							:							Optional[Any]     ,					*_lowerCAmelCase							:							int     ,					_lowerCAmelCase							:							Union[str, Any]=False     ,					**_lowerCAmelCase							:							Any	) ->			Tuple:




     """simple docstring"""
     if _tqdm_active and not disable:
        return tqdm_lib.tqdm(*_lowerCAmelCase     ,					**_lowerCAmelCase	)
     else:
        return EmptyTqdm(*_lowerCAmelCase     ,					**_lowerCAmelCase	)



  def        lowerCAmelCase__	(  self							:							Dict     ,					*_lowerCAmelCase							:							Tuple     ,					**_lowerCAmelCase							:							Any	) ->			List[Any]:




     """simple docstring"""
     snake_case_            =       None
     if _tqdm_active:
        return tqdm_lib.tqdm.set_lock(*_lowerCAmelCase     ,					**_lowerCAmelCase	)



  def        lowerCAmelCase__	(  self							:							Dict	) ->			str:




     """simple docstring"""
     if _tqdm_active:
        return tqdm_lib.tqdm.get_lock()






SCREAMING_SNAKE_CASE						:Optional[Any]			=  _tqdm_cls()



def       _lowerCAmelCase    (				)->bool:
   '''simple docstring'''






   global _tqdm_active
   return bool(_tqdm_active				)



def       _lowerCAmelCase    (				)->List[str]:
   '''simple docstring'''






   global _tqdm_active
   snake_case_            =       True



def       _lowerCAmelCase    (				)->List[str]:
   '''simple docstring'''






   global _tqdm_active
   snake_case_            =       False








from math import factorial



def       _lowerCAmelCase    (				lowerCAmelCase_				:int = 20				)->int:
   '''simple docstring'''






   snake_case_            =       2 * n  # middle entry of odd rows starting at row 3 is the solution for n = 1,
   # 2, 3,...
   snake_case_            =       n // 2

   return int(factorial(lowerCAmelCase_				) / (factorial(lowerCAmelCase_				) * factorial(n - k				))				)


if __name__ == "__main__":
   import sys

   if len(sys.argv) == 1:
      print(solution(20))
   else:
      try:
         SCREAMING_SNAKE_CASE						:Any			=  int(sys.argv[1])
         print(solution(n))
      except ValueError:
         print('''Invalid entry - please enter a number.''')




