





"""simple docstring"""




def 						UpperCAmelCase__		(     _UpperCAmelCase = 10 ,					_UpperCAmelCase = 1000 ,					_UpperCAmelCase = True					):






  """simple docstring"""





  assert (
      isinstance(_UpperCAmelCase ,					_UpperCAmelCase					)
      and isinstance(_UpperCAmelCase ,					_UpperCAmelCase					)
      and isinstance(_UpperCAmelCase ,					_UpperCAmelCase					)
  ), "Invalid type of value(s) specified to function!"

  if min_val > max_val:
    raise ValueError('Invalid value for min_val or max_val (min_value < max_value)'					)
  return min_val if option else max_val





def 						UpperCAmelCase__		(     _UpperCAmelCase ,					_UpperCAmelCase					):






  """simple docstring"""





  return int((number_a + number_a) / 2					)





def 						UpperCAmelCase__		(     _UpperCAmelCase ,					_UpperCAmelCase ,					_UpperCAmelCase					):






  """simple docstring"""





  assert (
      isinstance(_UpperCAmelCase ,					_UpperCAmelCase					) and isinstance(_UpperCAmelCase ,					_UpperCAmelCase					) and isinstance(_UpperCAmelCase ,					_UpperCAmelCase					)
  ), 'argument values must be type of "int"'

  if lower > higher:
    raise ValueError('argument value for lower and higher must be(lower > higher)'					)

  if not lower < to_guess < higher:
    raise ValueError(
        'guess value must be within the range of lower and higher value'					)

  def answer(_UpperCAmelCase					) -> str:
    if number > to_guess:
      return "high"
    elif number < to_guess:
      return "low"
    else:
      return "same"

  print('started...'					)

  A_  :       List[str]										=  lower
  A_  :       Tuple										=  higher

  A_  :       Optional[int]										=  []

  while True:
    A_  :       Tuple										=  get_avg(_UpperCAmelCase ,					_UpperCAmelCase					)
    last_numbers.append(_UpperCAmelCase					)

    if answer(_UpperCAmelCase					) == "low":
      A_  :       Optional[int]										=  number
    elif answer(_UpperCAmelCase					) == "high":
      A_  :       str										=  number
    else:
      break

  print(f"""guess the number : {last_numbers[-1]}"""					)
  print(f"""details : {last_numbers!s}"""					)





def 						UpperCAmelCase__		(     ):






  """simple docstring"""





  A_  :       Dict										=  int(input('Enter lower value : '					).strip()					)
  A_  :       List[Any]										=  int(input('Enter high value : '					).strip()					)
  A_  :       List[Any]										=  int(input('Enter value to guess : '					).strip()					)
  guess_the_number(_UpperCAmelCase ,					_UpperCAmelCase ,					_UpperCAmelCase					)


if __name__ == "__main__":
   main()






"""simple docstring"""




import os

# Precomputes a list of the 100 first triangular numbers
lowerCamelCase_     :						List[str]						=					[int(0.5 * n * (n + 1)) for n in range(1, 1_01)]





def 						UpperCAmelCase__		(     ):






  """simple docstring"""





  A_  :       Union[str, Any]										=  os.path.dirname(os.path.realpath(_UpperCAmelCase					)					)
  A_  :       Tuple										=  os.path.join(_UpperCAmelCase ,					'words.txt'					)

  A_  :       List[Any]										=  ''
  with open(_UpperCAmelCase					) as f:
    A_  :       int										=  f.readline()

  A_  :       Optional[Any]										=  [word.strip('"'					) for word in words.strip('\r\n'					).split(','					)]
  A_  :       Dict										=  [
      word
      for word in [sum(ord(_UpperCAmelCase					) - 64 for x in word					) for word in words]
      if word in TRIANGULAR_NUMBERS
  ]
  return len(_UpperCAmelCase					)


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