'''simple docstring'''




from collections.abc import Callable

__UpperCAmelCase  							=Callable[[float], float]  # type alias for a real -> real function






def __lowerCAmelCase				(							UpperCamelCase__       ,						UpperCamelCase__       ,						UpperCamelCase__       ,						)			->					float:
    __lowerCamelCase						=						float(UpperCamelCase__       )
    while True:
        try:
            __lowerCamelCase						=						prev_guess - function(UpperCamelCase__       ) / derivative(UpperCamelCase__       )
        except ZeroDivisionError:
            raise ZeroDivisionError('''Could not find root'''       ) from None
        if abs(prev_guess - next_guess       ) < 10**-5:
            return next_guess
        __lowerCamelCase						=						next_guess






def __lowerCAmelCase				(							UpperCamelCase__       )			->					float:
    return (x**3) - (2 * x) - 5






def __lowerCAmelCase				(							UpperCamelCase__       )			->					float:
    return 3 * (x**2) - 2


if __name__ == "__main__":
  print(newton(f, fa, 3))

'''simple docstring'''




def __lowerCAmelCase				(							UpperCamelCase__       )			->					int:
    __lowerCamelCase						=						len(UpperCamelCase__       )
    __lowerCamelCase						=						[0] * length
    __lowerCamelCase						=						[[False for i in range(UpperCamelCase__       )] for j in range(UpperCamelCase__       )]
    for i, c in enumerate(UpperCamelCase__       ):
        __lowerCamelCase						=						i
        for j in range(i + 1       ):
            if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
                __lowerCamelCase						=						True
                __lowerCamelCase						=						min(UpperCamelCase__       ,						0 if j == 0 else (cut[j - 1] + 1)       )
        __lowerCamelCase						=						mincut
    return cut[length - 1]


if __name__ == "__main__":
  __UpperCAmelCase  							=input("Enter the string: ").strip()
  __UpperCAmelCase  							=find_minimum_partitions(s)
  print(f'Minimum number of partitions required for the \'{s}\' is {ans}')
