'''simple docstring'''

import math
import sys
def 			__UpperCamelCase       (   UpperCAmelCase     ):
 if number != int(UpperCAmelCase     ):
  raise ValueError('''the value of input must be a natural number'''     )
 if number < 0:
  raise ValueError('''the value of input must not be a negative number'''     )
 if number == 0:
  return 1
 lowercase__				:    Any  =					[-1] * (number + 1)
 lowercase__				:    Optional[int]  =					0
 for i in range(1		,     number + 1     ):
  lowercase__				:    Optional[Any]  =					sys.maxsize
  lowercase__				:    Optional[int]  =					int(math.sqrt(UpperCAmelCase     )     )
  for j in range(1		,     root + 1     ):
   lowercase__				:    Optional[Any]  =					1 + answers[i - (j**2)]
   lowercase__				:    Tuple  =					min(UpperCAmelCase		,     UpperCAmelCase     )
  lowercase__				:    List[Any]  =					answer
 return answers[number]


if __name__ == "__main__":
  import doctest

  doctest.testmod()


'''simple docstring'''

def 			__UpperCamelCase       (   UpperCAmelCase = 1		,     UpperCAmelCase = 1000     ):
 lowercase__				:    Dict  =					1
 lowercase__				:    Dict  =					0

 for divide_by_number in range(UpperCAmelCase		,     digit + 1     ):
  lowercase__				:    list[int]  =					[]
  lowercase__				:    Union[str, Any]  =					numerator
  for _ in range(1		,     digit + 1     ):
   if now_divide in has_been_divided:
    if longest_list_length < len(UpperCAmelCase     ):
     lowercase__				:    Dict  =					len(UpperCAmelCase     )
     lowercase__				:    Optional[Any]  =					divide_by_number
   else:
    has_been_divided.append(UpperCAmelCase     )
    lowercase__				:    int  =					now_divide * 10 % divide_by_number

 return the_digit


# Tests
if __name__ == "__main__":
  import doctest

  doctest.testmod()

