'''simple docstring'''




from __future__ import annotations






def __lowerCAmelCase				(							UpperCamelCase__       ,						UpperCamelCase__       ,						UpperCamelCase__       )			->					int | float:
    if len(UpperCamelCase__       ) == 0:
        raise ValueError('''find_min() arg is an empty sequence'''       )
    if (
        left >= len(UpperCamelCase__       )
        or left < -len(UpperCamelCase__       )
        or right >= len(UpperCamelCase__       )
        or right < -len(UpperCamelCase__       )
    ):
        raise IndexError('''list index out of range'''       )
    if left == right:
        return nums[left]
    __lowerCamelCase						=						(left + right) >> 1  # the middle
    __lowerCamelCase						=						find_min(UpperCamelCase__       ,						UpperCamelCase__       ,						UpperCamelCase__       )  # find min in range[left, mid]
    __lowerCamelCase						=						find_min(UpperCamelCase__       ,						mid + 1       ,						UpperCamelCase__       )  # find min in range[mid + 1, right]

    return left_min if left_min <= right_min else right_min


if __name__ == "__main__":
  import doctest

  doctest.testmod(verbose=True)

'''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}')
