


import os

def 			__SCREAMING_SNAKE_CASE		(		)     ->	int:



	"""simple docstring"""






	a_     			=   os.path.dirname(os.path.realpath(UpperCamelCase	)	)
	a_     			=   os.path.join(UpperCamelCase     ,					"""triangle.txt"""	)

	with open(UpperCamelCase	) as in_file:
		a_     			=   [[int(UpperCamelCase	) for i in line.split()] for line in in_file]

	while len(UpperCamelCase	) != 1:
		a_     			=   triangle.pop()
		a_     			=   triangle[-1]
		for j in range(len(UpperCamelCase	) - 1	):
			curr_row[j] += max(last_row[j]     ,					last_row[j + 1]	)
	return triangle[0][0]


if __name__ == "__main__":
			print(solution())



def 			__SCREAMING_SNAKE_CASE		(		UpperCamelCase		:      str	)     ->	int:



	"""simple docstring"""






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


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