





'''simple docstring'''





import itertools
from dataclasses import dataclass
from typing import Optional

import pandas as pd
import pyarrow as pa

import datasets
from datasets.table import table_cast







@dataclass
class 			__A       (      datasets.BuilderConfig  ):




      """simple docstring"""







      UpperCAmelCase__						=      None







class 			__A       (      datasets.ArrowBasedBuilder  ):




      """simple docstring"""







      UpperCAmelCase__						=      PandasConfig


      def 				__snake_case			(		self):



             """simple docstring"""





             return datasets.DatasetInfo(features=self.config.features)


      def 				__snake_case			(		self      ,							a__):



             """simple docstring"""





             if not self.config.data_files:
                    raise ValueError(F"""At least one data file must be specified, but got data_files={self.config.data_files}""")
             _lowerCamelCase							:     Optional[Any]	=		dl_manager.download_and_extract(self.config.data_files)
             if isinstance(a__      ,							(str, list, tuple)):
                    _lowerCamelCase							:     Dict	=		data_files
                    if isinstance(a__      ,							a__):
                           _lowerCamelCase							:     Dict	=		[files]
                    # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
                    _lowerCamelCase							:     List[str]	=		[dl_manager.iter_files(a__) for file in files]
                    return [datasets.SplitGenerator(name=datasets.Split.TRAIN      ,							gen_kwargs={'''files''': files})]
             _lowerCamelCase							:     List[str]	=		[]
             for split_name, files in data_files.items():
                    if isinstance(a__      ,							a__):
                           _lowerCamelCase							:     Optional[Any]	=		[files]
                    # Use `dl_manager.iter_files` to skip hidden files in an extracted archive
                    _lowerCamelCase							:     int	=		[dl_manager.iter_files(a__) for file in files]
                    splits.append(datasets.SplitGenerator(name=a__      ,							gen_kwargs={'''files''': files}))
             return splits


      def 				__snake_case			(		self      ,							a__):



             """simple docstring"""





             if self.config.features is not None:
                    # more expensive cast to support nested features with keys in a different order
                    # allows str <-> int/float or str to Audio for example
                    _lowerCamelCase							:     Any	=		table_cast(a__      ,							self.config.features.arrow_schema)
             return pa_table



      def 				__snake_case			(		self      ,							a__):



             """simple docstring"""





             for i, file in enumerate(itertools.chain.from_iterable(a__)):
                    with open(a__      ,							'''rb''') as f:
                           _lowerCamelCase							:     List[Any]	=		pa.Table.from_pandas(pd.read_pickle(a__))
                           yield i, self._cast_table(a__)








def    __UpperCAmelCase(      lowercase_ = 10_00      ):
       _lowerCamelCase							:     Optional[int]	=		2**power
       _lowerCamelCase							:     Optional[int]	=		0
       while n:
              _lowerCamelCase,  _lowerCamelCase							:     Optional[Any]	=		r + n % 10, n // 10
       return r


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

