



'''simple docstring'''


def  UpperCAmelCase_       (		lowercase__       ,	lowercase__       ):


					'''simple docstring'''







					if discount_rate < 0:
										raise ValueError("Discount rate cannot be negative"       )
					if not cash_flows:
										raise ValueError("Cash flows list cannot be empty"       )
					a_       		=sum(
					    cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(lowercase__       )       )
					return round(lowercase__       ,	ndigits=2       )


if __name__ == "__main__":
		import doctest

		doctest.testmod()







'''simple docstring'''


import os

# Precomputes a list of the 100 first triangular numbers
lowercase							       =			[int(0.5 * n * (n + 1)) for n in range(1, 101)]






def  UpperCAmelCase_       (		):


     '''simple docstring'''







     a_       		=os.path.dirname(os.path.realpath(lowercase__       )       )
     a_       		=os.path.join(lowercase__       ,	"words.txt"       )

     a_       		=""
     with open(lowercase__       ) as f:
          a_       		=f.readline()

     a_       		=[word.strip("\""       ) for word in words.strip("\r\n"       ).split(","       )]
     a_       		=[
         word
         for word in [sum(ord(lowercase__       ) - 6_4 for x in word       ) for word in words]
         if word in TRIANGULAR_NUMBERS
     ]
     return len(lowercase__       )


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


