



"""simple docstring"""





from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream



class  _lowerCAmelCase     (					SCREAMING_SNAKE_CASE__		):





		"""simple docstring"""






		def __init__(       self				,     _lowercase				,     _lowercase = None				,     _lowercase = None				,     _lowercase = False				,     _lowercase = False				,     _lowercase = None				,     _lowercase = None				,     **_lowercase				,     )			->    Optional[Any]:







								'''simple docstring'''

								super().__init__(
								    features=_lowercase				,     cache_dir=_lowercase				,     keep_in_memory=_lowercase				,     streaming=_lowercase				,     num_proc=_lowercase				,     **_lowercase				,     )
								snake_case_ :			Tuple            =      Generator(
								    cache_dir=_lowercase				,     features=_lowercase				,     generator=_lowercase				,     gen_kwargs=_lowercase				,     **_lowercase				,     )





		def  UpperCAmelCase__				(       self )			->    Tuple:







								'''simple docstring'''

								if self.streaming:
														snake_case_ :			int            =      self.builder.as_streaming_dataset(split="""train""" )
								# Build regular (map-style) dataset
								else:
														snake_case_ :			Union[str, Any]            =      None
														snake_case_ :			Union[str, Any]            =      None
														snake_case_ :			Any            =      None
														snake_case_ :			str            =      None

														self.builder.download_and_prepare(
														    download_config=_lowercase				,     download_mode=_lowercase				,     verification_mode=_lowercase				,     base_path=_lowercase				,     num_proc=self.num_proc				,     )
														snake_case_ :			Union[str, Any]            =      self.builder.as_dataset(
														    split="""train"""				,     verification_mode=_lowercase				,     in_memory=self.keep_in_memory )
								return dataset


"""simple docstring"""






def      UpperCAmelCase__			(							lowerCAmelCase__	:int = 1_0**9						)					->       int:
      '''simple docstring'''


      lowercase								=      1
      lowercase								=      2

      lowercase								=      0
      lowercase								=      0
      lowercase								=      0
      while perimeter <= max_perimeter:
            perimeters_sum += perimeter

            prev_value += 2 * value
            value += prev_value

            lowercase								=      2 * value + 2 if i % 2 == 0 else 2 * value - 2
            i += 1

      return perimeters_sum


if __name__ == "__main__":
       print(F"""{solution() = }""")



