"""simple docstring"""
import itertools







def 		__a  (      _SCREAMING_SNAKE_CASE = 1000000  )      ->int:
  a__:	str     				=      [1]

  for i in itertools.count(len(_SCREAMING_SNAKE_CASE  )  ):
    a__:	Any     				=      0
    for j in itertools.count(1  ):
      a__:	List[str]     				=      -1 if j % 2 == 0 else +1
      a__:	Dict     				=      (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(_SCREAMING_SNAKE_CASE  )

  return 0


if __name__ == "__main__":
 import doctest

 doctest.testmod()

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




'''simple docstring'''







from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding






class 					lowerCAmelCase__  (    lowerCamelCase_	):
					lowerCAmelCase_	  =	['''image_processor''', '''tokenizer''']
					lowerCAmelCase_	  =	'''EfficientNetImageProcessor'''
					lowerCAmelCase_	  =	('''BertTokenizer''', '''BertTokenizerFast''')






					def __init__(  self							,				__SCREAMING_SNAKE_CASE							,				__SCREAMING_SNAKE_CASE						):


											"""simple docstring"""





											super().__init__(__SCREAMING_SNAKE_CASE							,				__SCREAMING_SNAKE_CASE						)






					def __call__(  self							,				__SCREAMING_SNAKE_CASE=None							,				__SCREAMING_SNAKE_CASE=None							,				__SCREAMING_SNAKE_CASE="max_length"							,				__SCREAMING_SNAKE_CASE=64							,				__SCREAMING_SNAKE_CASE=None							,				**__SCREAMING_SNAKE_CASE						):


											"""simple docstring"""





											if text is None and images is None:
																	raise ValueError('''You have to specify either text or images. Both cannot be none.'''						)

											if text is not None:
																	lowercase_      :	str						=			self.tokenizer(
																	    __SCREAMING_SNAKE_CASE							,				padding=__SCREAMING_SNAKE_CASE							,				max_length=__SCREAMING_SNAKE_CASE							,				return_tensors=__SCREAMING_SNAKE_CASE							,				**__SCREAMING_SNAKE_CASE						)

											if images is not None:
																	lowercase_      :	int						=			self.image_processor(__SCREAMING_SNAKE_CASE							,				return_tensors=__SCREAMING_SNAKE_CASE							,				**__SCREAMING_SNAKE_CASE						)

											if text is not None and images is not None:
																	lowercase_      :	Any						=			image_features.pixel_values
																	return encoding
											elif text is not None:
																	return encoding
											else:
																	return BatchEncoding(data=dict(**__SCREAMING_SNAKE_CASE						)							,				tensor_type=__SCREAMING_SNAKE_CASE						)






					def       _snake_case       (  self							,				*__SCREAMING_SNAKE_CASE							,				**__SCREAMING_SNAKE_CASE						):


											"""simple docstring"""





											return self.tokenizer.batch_decode(*__SCREAMING_SNAKE_CASE							,				**__SCREAMING_SNAKE_CASE						)






					def       _snake_case       (  self							,				*__SCREAMING_SNAKE_CASE							,				**__SCREAMING_SNAKE_CASE						):


											"""simple docstring"""





											return self.tokenizer.decode(*__SCREAMING_SNAKE_CASE							,				**__SCREAMING_SNAKE_CASE						)






					@property
					def       _snake_case       (  self						):


											"""simple docstring"""





											lowercase_      :	Dict						=			self.tokenizer.model_input_names
											lowercase_      :	Optional[int]						=			self.image_processor.model_input_names
											return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names						)						)



