






import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu
@require_cpu
class    _UpperCAmelCase      ( unittest.TestCase			):

				"""simple docstring"""




				def        lowercase__     (  self		:					str						):

								'''simple docstring'''
								lowercase__     				=    torch.nn.Linear(10,						10						)
								lowercase__     				=    torch.optim.SGD(model.parameters(),						0.1						)
								lowercase__     				=    Accelerator()
								lowercase__     				=    accelerator.prepare(lowerCamelCase						)
								try:
												pickle.loads(pickle.dumps(lowerCamelCase						)						)
								except Exception as e:
												self.fail(F"""Accelerated optimizer pickling failed with {e}"""						)
								AcceleratorState._reset_state()












from itertools import count






def 						a    (		lowerCamelCase_ = 50       ):






				'''simple docstring'''
				lowercase__     				=    [1] * min_block_length

				for n in count(lowerCamelCase_       ):
								fill_count_functions.append(1       )

								for block_length in range(lowerCamelCase_	,     n + 1       ):
												for block_start in range(n - block_length       ):
																fill_count_functions[n] += fill_count_functions[
																    n - block_start - block_length - 1
																]

												fill_count_functions[n] += 1

								if fill_count_functions[n] > 100_0000:
												break

				return n


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




