

import itertools




def     UpperCAmelCase__       (    _A   :				int = 1_00_00_00							):





  '''simple docstring'''







  a__						=[1]

  for i in itertools.count(len(_A							)							):
    a__						=0
    for j in itertools.count(1							):
      a__						=-1 if j % 2 == 0 else +1
      a__						=(j * j * 3 - j) // 2
      if index > i:
        break
      item += partitions[i - index] * sign
      item %= number
      index += j
      if index > i:
        break
      item += partitions[i - index] * sign
      item %= number

    if item == 0:
      return i
    partitions.append(_A							)

  return 0


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       print(f"""{solution() = }""")



from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available







@dataclass
# Copied from diffusers.pipelines.stable_diffusion.__init__.StableDiffusionPipelineOutput with Stable->Alt
class 		__magic_name__    (							lowerCamelCase__							):

   '''simple docstring'''




   lowerCamelCase__				:			Union[List[PIL.Image.Image], np.ndarray]
   lowerCamelCase__				:			Optional[List[bool]]


if is_transformers_available() and is_torch_available():
       from .modeling_roberta_series import RobertaSeriesModelWithTransformation
       from .pipeline_alt_diffusion import AltDiffusionPipeline
       from .pipeline_alt_diffusion_imgaimg import AltDiffusionImgaImgPipeline
