




from typing import Optional

import pyspark

from .. import Features, NamedSplit
from ..download import DownloadMode
from ..packaged_modules.spark.spark import Spark
from .abc import AbstractDatasetReader


class        UpperCamelCase_					(				UpperCAmelCase__  ):

    '''simple docstring'''






    def __init__(    self   :			str      ,				UpperCAmelCase__   :			pyspark.sql.DataFrame      ,				UpperCAmelCase__   :			Optional[NamedSplit] = None      ,				UpperCAmelCase__   :			Optional[Features] = None      ,				UpperCAmelCase__   :			bool = True      ,				UpperCAmelCase__   :			str = None      ,				UpperCAmelCase__   :			bool = False      ,				UpperCAmelCase__   :			str = None      ,				UpperCAmelCase__   :			bool = True      ,				UpperCAmelCase__   :			str = "arrow"      ,				**UpperCAmelCase__   :			str      ,				)		->Tuple:





           '''simple docstring'''

           super().__init__(
               split=UpperCAmelCase__      ,				features=UpperCAmelCase__      ,				cache_dir=UpperCAmelCase__      ,				keep_in_memory=UpperCAmelCase__      ,				streaming=UpperCAmelCase__      ,				**UpperCAmelCase__      ,				)
           A__   				=					load_from_cache_file
           A__   				=					file_format
           A__   				=					Spark(
               df=UpperCAmelCase__      ,				features=UpperCAmelCase__      ,				cache_dir=UpperCAmelCase__      ,				working_dir=UpperCAmelCase__      ,				**UpperCAmelCase__      ,				)





    def  SCREAMING_SNAKE_CASE							(    self   :			Optional[int])		->Tuple:





           '''simple docstring'''

           if self.streaming:
                  return self.builder.as_streaming_dataset(split=self.split)
           A__   				=					None if self._load_from_cache_file else DownloadMode.FORCE_REDOWNLOAD
           self.builder.download_and_prepare(
               download_mode=UpperCAmelCase__      ,				file_format=self._file_format      ,				)
           return self.builder.as_dataset(split=self.split)








def SCREAMING_SNAKE_CASE       ( lowercase_		)     -> int:



       """simple docstring"""

       A__   				=					1
       for i in range(1				,       num + 1		):
              fact *= i
       return fact







def SCREAMING_SNAKE_CASE       ( lowercase_		)     -> int:



       """simple docstring"""

       A__   				=					0
       while number > 0:
              A__   				=					number % 10
              sum_of_digits += last_digit
              A__   				=					number // 10  # Removing the last_digit from the given number
       return sum_of_digits







def SCREAMING_SNAKE_CASE       ( lowercase_ = 100		)     -> int:



       """simple docstring"""

       A__   				=					factorial(lowercase_		)
       A__   				=					split_and_add(lowercase_		)
       return result


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


