





from math import ceil






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase	):
     _SCREAMING_SNAKE_CASE       :	Dict						    =							list(range(0,       __lowerCamelCase	)	)

     _SCREAMING_SNAKE_CASE       :	List[str]						    =							[item for sublist in list(device_map.values()	) for item in sublist]

     # Duplicate check
     _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							[]
     for i in device_map_blocks:
          if device_map_blocks.count(__lowerCamelCase	) > 1 and i not in duplicate_blocks:
               duplicate_blocks.append(__lowerCamelCase	)
    # Missing blocks
     _SCREAMING_SNAKE_CASE       :	int						    =							[i for i in blocks if i not in device_map_blocks]
     _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							[i for i in device_map_blocks if i not in blocks]

     if len(__lowerCamelCase	) != 0:
          raise ValueError(
              "Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device."
              " These attention blocks were specified more than once: " + str(__lowerCamelCase	)	)
     if len(__lowerCamelCase	) != 0:
          raise ValueError(
              "There are attention blocks for this model that are not specified in the device_map. Add these attention "
              "blocks to a device on the device_map: " + str(__lowerCamelCase	)	)
     if len(__lowerCamelCase	) != 0:
          raise ValueError(
              "The device_map contains more attention blocks than this model has. Remove these from the device_map:"
              + str(__lowerCamelCase	)	)






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase	):
     _SCREAMING_SNAKE_CASE       :	int						    =							list(range(__lowerCamelCase	)	)
     _SCREAMING_SNAKE_CASE       :	str						    =							int(ceil(n_layers / len(__lowerCamelCase	)	)	)
     _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							[layers[i : i + n_blocks] for i in range(0,       __lowerCamelCase,       __lowerCamelCase	)]

     return dict(zip(__lowerCamelCase,       __lowerCamelCase	)	)






def     lowerCamelCase__			(__lowerCamelCase = 10**9	):
     _SCREAMING_SNAKE_CASE       :	List[str]						    =							1
     _SCREAMING_SNAKE_CASE       :	Any						    =							2

     _SCREAMING_SNAKE_CASE       :	List[Any]						    =							0
     _SCREAMING_SNAKE_CASE       :	Dict						    =							0
     _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							0
     while perimeter <= max_perimeter:
          perimeters_sum += perimeter

          prev_value += 2 * value
          value += prev_value

          _SCREAMING_SNAKE_CASE       :	Tuple						    =							2 * value + 2 if i % 2 == 0 else 2 * value - 2
          i += 1

     return perimeters_sum


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