
import os
from argparse import ArgumentParser
from typing import List

import torch.utils.data

from datasets import Dataset, IterableDataset
from datasets.distributed import split_dataset_by_node


__lowerCAmelCase			:     Optional[int]           =   4
__lowerCAmelCase			:     Optional[Any]           =   3




class        UpperCAmelCase_			( a__     ):


  '''simple docstring'''







  pass







def a__    (       A_					):






  '''simple docstring'''





  for shard in shards:
    for i in range(A_					):
      yield {"i": i, "shard": shard}

def a__    (       ):






  '''simple docstring'''





  __magic_name__				     =       int(os.environ["""RANK"""]					)
  __magic_name__				     =       int(os.environ["""WORLD_SIZE"""]					)

  __magic_name__				     =       ArgumentParser()
  parser.add_argument("""--streaming""",     type=A_					)
  parser.add_argument("""--local_rank""",     type=A_					)
  parser.add_argument("""--num_workers""",     type=A_,     default=0					)
  __magic_name__				     =       parser.parse_args()
  __magic_name__				     =       args.streaming
  __magic_name__				     =       args.num_workers

  __magic_name__				     =       {'''shards''': [f'''shard_{shard_idx}''' for shard_idx in range(A_					)]}
  __magic_name__				     =       IterableDataset.from_generator(A_,     gen_kwargs=A_					)
  if not streaming:
    __magic_name__				     =       Dataset.from_list(list(A_					)					)

  __magic_name__				     =       split_dataset_by_node(A_,     rank=A_,     world_size=A_					)
  __magic_name__				     =       torch.utils.data.DataLoader(A_,     num_workers=A_					)

  __magic_name__				     =       NUM_SHARDS * NUM_ITEMS_PER_SHARD
  __magic_name__				     =       full_size // world_size
  expected_local_size += int(rank < (full_size % world_size)					)

  __magic_name__				     =       sum(1 for _ in dataloader					)
  if local_size != expected_local_size:
    raise FailedTestError(f'''local_size {local_size} != expected_local_size {expected_local_size}'''					)


if __name__ == "__main__":
    main()


'''simple docstring'''

def 			__UpperCamelCase       (   UpperCAmelCase     ):
 lowercase__				:    Optional[int]  =					1
 for i in range(1		,     num + 1     ):
  fact *= i
 return fact
def 			__UpperCamelCase       (   UpperCAmelCase     ):
 lowercase__				:    Optional[Any]  =					0
 while number > 0:
  lowercase__				:    str  =					number % 10
  sum_of_digits += last_digit
  lowercase__				:    List[str]  =					number // 10  # Removing the last_digit from the given number
 return sum_of_digits
def 			__UpperCamelCase       (   UpperCAmelCase = 100     ):
 lowercase__				:    Optional[int]  =					factorial(UpperCAmelCase     )
 lowercase__				:    Dict  =					split_and_add(UpperCAmelCase     )
 return result


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

