'''simple docstring'''




import os






def __lowerCAmelCase				(							)			->					Tuple:
				__lowerCamelCase						=						0
				__lowerCamelCase						=						0
				with open(os.path.dirname(UpperCamelCase__       ) + '''/p022_names.txt'''       ) as file:
								__lowerCamelCase						=						str(file.readlines()[0]       )
								__lowerCamelCase						=						name.replace('''"'''       ,						''''''       ).split(''','''       )

				name.sort()
				for i in range(len(UpperCamelCase__       )       ):
								for j in name[i]:
												temp_sum += ord(UpperCamelCase__       ) - ord('''A'''       ) + 1
								total_sum += (i + 1) * temp_sum
								__lowerCamelCase						=						0
				return total_sum


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

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