import itertools



def 						__snake_case (       lowerCAmelCase       :     int = 100_0000			):
 __UpperCAmelCase         =					[1]

 for i in itertools.count(len(lowerCAmelCase			)			):
  __UpperCAmelCase         =					0
  for j in itertools.count(1			):
   __UpperCAmelCase         =					-1 if j % 2 == 0 else +1
   __UpperCAmelCase         =					(j * j * 3 - j) // 2
   if index > i:
    break
   item += partitions[i - index] * sign
   item %= number
   index += j
   if index > i:
    break
   item += partitions[i - index] * sign
   item %= number

  if item == 0:
   return i
  partitions.append(lowerCAmelCase			)

 return 0


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     print(f"{solution() = }")




'''simple docstring'''




def 						__snake_case (       lowerCAmelCase       :     str			):
 __UpperCAmelCase         =					5381
 for x in s:
  __UpperCAmelCase         =					((hash_value << 5) + hash_value) + ord(lowerCAmelCase			)
 return hash_value & 0Xffff_ffff



