



"""simple docstring"""







def   lowerCAmelCase__			(     lowerCamelCase__ = 10**9			) ->							int:
							A         =					1
							A         =					2

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

														prev_value += 2 * value
														value += prev_value

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

							return perimeters_sum


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








"""simple docstring"""







def   lowerCAmelCase__			(     lowerCamelCase__			) ->							int:

							if not isinstance(lowerCamelCase__				,      lowerCamelCase__			):
														raise ValueError('multiplicative_persistence() only accepts integral values'			)
							if num < 0:
														raise ValueError('multiplicative_persistence() does not accept negative values'			)

							A         =					0
							A         =					str(lowerCamelCase__			)

							while len(lowerCamelCase__			) != 1:
														A         =					[int(lowerCamelCase__			) for i in num_string]

														A         =					1
														for i in range(0				,      len(lowerCamelCase__			)			):
																					total *= numbers[i]

														A         =					str(lowerCamelCase__			)

														steps += 1
							return steps

def   lowerCAmelCase__			(     lowerCamelCase__			) ->							int:

							if not isinstance(lowerCamelCase__				,      lowerCamelCase__			):
														raise ValueError('additive_persistence() only accepts integral values'			)
							if num < 0:
														raise ValueError('additive_persistence() does not accept negative values'			)

							A         =					0
							A         =					str(lowerCamelCase__			)

							while len(lowerCamelCase__			) != 1:
														A         =					[int(lowerCamelCase__			) for i in num_string]

														A         =					0
														for i in range(0				,      len(lowerCamelCase__			)			):
																					total += numbers[i]

														A         =					str(lowerCamelCase__			)

														steps += 1
							return steps


if __name__ == "__main__":
							import doctest

							doctest.testmod()



