


"""simple docstring"""
import numpy as np
import torch
from torch.utils.data import DataLoader

from accelerate.utils.dataclasses import DistributedType



class      __A     :





							'''simple docstring'''

							def __init__(				self							:      List[str]		,       UpperCAmelCase_							:      List[Any]=2		,       UpperCAmelCase_							:      Tuple=3		,       UpperCAmelCase_							:      List[str]=64		,       UpperCAmelCase_							:      Tuple=None       )					->int:



														"""simple docstring"""



														snake_case_           =		np.random.default_rng(lowercase_       )
														snake_case_           =		length
														snake_case_           =		rng.normal(size=(length,)       ).astype(np.floataa       )
														snake_case_           =		a * self.x + b + rng.normal(scale=0.1		,       size=(length,)       ).astype(np.floataa       )



							def __len__(				self							:      int       )					->Dict:



														"""simple docstring"""



														return self.length



							def __getitem__(				self							:      Tuple		,       UpperCAmelCase_							:      str       )					->List[Any]:



														"""simple docstring"""



														return {"x": self.x[i], "y": self.y[i]}



class      __A     (torch.nn.Module):





							'''simple docstring'''

							def __init__(				self							:      List[str]		,       UpperCAmelCase_							:      Tuple=0		,       UpperCAmelCase_							:      Tuple=0		,       UpperCAmelCase_							:      int=False       )					->Dict:



														"""simple docstring"""



														super().__init__()
														snake_case_           =		torch.nn.Parameter(torch.tensor([2, 3]       ).float()       )
														snake_case_           =		torch.nn.Parameter(torch.tensor([2, 3]       ).float()       )
														snake_case_           =		True



							def 		lowerCAmelCase       (				self							:      int		,       UpperCAmelCase_							:      Any=None       )					->Any:



														"""simple docstring"""



														if self.first_batch:
																					print(F"""Model dtype: {self.a.dtype}, {self.b.dtype}. Input dtype: {x.dtype}"""       )
																					snake_case_           =		False
														return x * self.a[0] + self.b[0]



class      __A     (torch.nn.Module):





							'''simple docstring'''

							def __init__(				self							:      Tuple		,       UpperCAmelCase_							:      Any=0		,       UpperCAmelCase_							:      List[Any]=0		,       UpperCAmelCase_							:      Dict=False       )					->Dict:



														"""simple docstring"""



														super().__init__()
														snake_case_           =		torch.nn.Parameter(torch.tensor(lowercase_       ).float()       )
														snake_case_           =		torch.nn.Parameter(torch.tensor(lowercase_       ).float()       )
														snake_case_           =		True



							def 		lowerCAmelCase       (				self							:      List[Any]		,       UpperCAmelCase_							:      Tuple=None       )					->Union[str, Any]:



														"""simple docstring"""



														if self.first_batch:
																					print(F"""Model dtype: {self.a.dtype}, {self.b.dtype}. Input dtype: {x.dtype}"""       )
																					snake_case_           =		False
														return x * self.a + self.b







def 						_a				(      _SCREAMING_SNAKE_CASE				, _SCREAMING_SNAKE_CASE = 16				)    ->				int:
							from datasets import load_dataset
							from transformers import AutoTokenizer

							snake_case_           =		AutoTokenizer.from_pretrained("""bert-base-cased"""				)
							snake_case_           =		{"train": "tests/test_samples/MRPC/train.csv", "validation": "tests/test_samples/MRPC/dev.csv"}
							snake_case_           =		load_dataset("""csv"""				, data_files=__SCREAMING_SNAKE_CASE				)
							snake_case_           =		datasets["train"].unique("""label"""				)

							snake_case_           =		{v: i for i, v in enumerate(__SCREAMING_SNAKE_CASE				)}

							def tokenize_function(_SCREAMING_SNAKE_CASE				):
														# max_length=None => use the model max length (it's actually the default)
														snake_case_           =		tokenizer(
														    examples["""sentence1"""]				, examples["""sentence2"""]				, truncation=__SCREAMING_SNAKE_CASE				, max_length=__SCREAMING_SNAKE_CASE				, padding="""max_length"""				)
														if "label" in examples:
																					snake_case_           =		[label_to_id[l] for l in examples["label"]]
														return outputs

							# Apply the method we just defined to all the examples in all the splits of the dataset
							snake_case_           =		datasets.map(
							    __SCREAMING_SNAKE_CASE				, batched=__SCREAMING_SNAKE_CASE				, remove_columns=["""sentence1""", """sentence2""", """label"""]				, )

							def collate_fn(_SCREAMING_SNAKE_CASE				):
														# On TPU it's best to pad everything to the same length or training will be very slow.
														if accelerator.distributed_type == DistributedType.TPU:
																					return tokenizer.pad(__SCREAMING_SNAKE_CASE				, padding="""max_length"""				, max_length=128				, return_tensors="""pt"""				)
														return tokenizer.pad(__SCREAMING_SNAKE_CASE				, padding="""longest"""				, return_tensors="""pt"""				)

							# Instantiate dataloaders.
							snake_case_           =		DataLoader(tokenized_datasets["""train"""]				, shuffle=__SCREAMING_SNAKE_CASE				, collate_fn=__SCREAMING_SNAKE_CASE				, batch_size=2				)
							snake_case_           =		DataLoader(tokenized_datasets["""validation"""]				, shuffle=__SCREAMING_SNAKE_CASE				, collate_fn=__SCREAMING_SNAKE_CASE				, batch_size=1				)

							return train_dataloader, eval_dataloader







"""simple docstring"""
from math import factorial







def 						_a				(      _SCREAMING_SNAKE_CASE = 100				)    ->				int:
							return sum(int(_SCREAMING_SNAKE_CASE				) for x in str(factorial(_SCREAMING_SNAKE_CASE				)				)				)


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



