"""simple docstring"""



def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int   ):





  '''simple docstring'''





  if not isinstance(SCREAMING_SNAKE_CASE_		, SCREAMING_SNAKE_CASE_   ):
    raise TypeError('recursive_lucas_number accepts only integer arguments.'   )
  if n_th_number == 0:
    return 2
  if n_th_number == 1:
    return 1

  return recursive_lucas_number(n_th_number - 1   ) + recursive_lucas_number(
      n_th_number - 2   )
def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  int   ):





  '''simple docstring'''





  if not isinstance(SCREAMING_SNAKE_CASE_		, SCREAMING_SNAKE_CASE_   ):
    raise TypeError('dynamic_lucas_number accepts only integer arguments.'   )
  lowercase   ,					lowercase							   =	2, 1
  for _ in range(SCREAMING_SNAKE_CASE_   ):
    lowercase   ,					lowercase							   =	b, a + b
  return a


if __name__ == "__main__":
    from doctest import testmod

    testmod()
    _UpperCamelCase		:  Dict						=		int(input('Enter the number of terms in lucas series:\n').strip())
    print('Using recursive function to calculate lucas series:')
    print(' '.join(str(recursive_lucas_number(i)) for i in range(n)))
    print('\nUsing dynamic function to calculate lucas series:')
    print(' '.join(str(dynamic_lucas_number(i)) for i in range(n)))










"""simple docstring"""



def 						_SCREAMING_SNAKE_CASE			(   __snake_case      :  str   ):





  '''simple docstring'''





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


if __name__ == "__main__":
    _UpperCamelCase		:  List[Any]						=		input('Enter the string: ').strip()
    _UpperCamelCase		:  List[Any]						=		find_minimum_partitions(s)
    print(F'''Minimum number of partitions required for the \'{s}\' is {ans}''')


