



from dataclasses import dataclass, field
from typing import Tuple

from ..utils import cached_property, is_torch_available, is_torch_tpu_available, logging, requires_backends
from .benchmark_args_utils import BenchmarkArguments


if is_torch_available():
		import torch

if is_torch_tpu_available(check_device=False):
		import torch_xla.core.xla_model as xm


snake_case    :						Optional[Any]  =						logging.get_logger(__name__)




@dataclass
class 							lowerCAmelCase__  (	UpperCamelCase						):
					__A     :    Union[str, Any]           =						[
					    'no_inference',
					    'no_cuda',
					    'no_tpu',
					    'no_speed',
					    'no_memory',
					    'no_env_print',
					    'no_multi_process',
					]







					def __init__(       self      :     str			,		**_A      :     str):
											for deprecated_arg in self.deprecated_args:
																	if deprecated_arg in kwargs:
																							A__	:							Optional[Any]						    = deprecated_arg[3:]
																							setattr(self			,		_A			,		not kwargs.pop(_A))
																							logger.warning(
																							    F'{deprecated_arg} is depreciated. Please use --no_{positive_arg} or'
																							    F' {positive_arg}={kwargs[positive_arg]}')

											A__	:							int						    = kwargs.pop("torchscript"			,		self.torchscript)
											A__	:							str						    = kwargs.pop("torch_xla_tpu_print_metrics"			,		self.torch_xla_tpu_print_metrics)
											A__	:							Union[str, Any]						    = kwargs.pop("fp16_opt_level"			,		self.fpaa_opt_level)
											super().__init__(**_A)

					__A     :    bool           =						field(default=UpperCamelCase					,							metadata={'help': 'Trace the models using torchscript'}						)
					__A     :    bool           =						field(default=UpperCamelCase					,							metadata={'help': 'Print Xla/PyTorch tpu metrics'}						)
					__A     :    str           =						field(
					    default='O1'					,							metadata={
					        'help': (
					            'For fp16: Apex AMP optimization level selected in [\'O0\', \'O1\', \'O2\', and \'O3\']. '
					            'See details at https://nvidia.github.io/apex/amp.html'
					        )
					    }					,							)







					@cached_property
					def  _lowercase			(       self      :     Union[str, Any]):
											requires_backends(self			,		["torch"])
											logger.info("PyTorch: setting up devices")
											if not self.cuda:
																	A__	:							int						    = torch.device("cpu")
																	A__	:							Dict						    = 0
											elif is_torch_tpu_available():
																	A__	:							Optional[int]						    = xm.xla_device()
																	A__	:							List[str]						    = 0
											else:
																	A__	:							Optional[int]						    = torch.device("cuda" if torch.cuda.is_available() else "cpu")
																	A__	:							Union[str, Any]						    = torch.cuda.device_count()
											return device, n_gpu







					@property
					def  _lowercase			(       self      :     Optional[int]):
											return is_torch_tpu_available() and self.tpu







					@property
					def  _lowercase			(       self      :     Optional[int]):
											requires_backends(self			,		["torch"])
											# TODO(PVP): currently only single GPU is supported
											return torch.cuda.current_device()







					@property
					def  _lowercase			(       self      :     Optional[Any]):
											requires_backends(self			,		["torch"])
											return self._setup_devices[0]







					@property
					def  _lowercase			(       self      :     Union[str, Any]):
											requires_backends(self			,		["torch"])
											return self._setup_devices[1]







					@property
					def  _lowercase			(       self      :     int):
											return self.n_gpu > 0




def 	snake_case__       (					)		->		Union[str, Any]:







						"""simple docstring"""

						A__	:							Tuple						    = []
						A__	:							Optional[int]						    = 1

						while len(__lowercase       ) < 1E6:
												constant.append(str(__lowercase       )       )
												i += 1

						A__	:							Any						    = "".join(__lowercase       )

						return (
						    int(constant[0]       )
						    * int(constant[9]       )
						    * int(constant[9_9]       )
						    * int(constant[9_9_9]       )
						    * int(constant[9_9_9_9]       )
						    * int(constant[9_9_9_9_9]       )
						    * int(constant[9_9_9_9_9_9]       )
						)


if __name__ == "__main__":
		print(solution())