



'''simple docstring'''






class 				lowercase			:


 """simple docstring"""


 def __init__(				self				)						->  None:
        _UpperCAmelCase    :		Union[str, Any]     	=					[0, 1]







 def _snake_case					(				self    ,a_				)						->  list:
        if (difference := index - (len(self.sequence				) - 2)) >= 1:
               for _ in range(a_				):
                      self.sequence.append(self.sequence[-1] + self.sequence[-2]				)
        return self.sequence[:index]







def        snake_case_   (	)->						None:





       '''simple docstring'''


       print(
           """Fibonacci Series Using Dynamic Programming\n"""			,  """Enter the index of the Fibonacci number you want to calculate """			,  """in the prompt below. (To exit enter exit or Ctrl-C)\n"""			,  sep=""""""			,  )
       _UpperCAmelCase    :		Dict     	=					Fibonacci()

       while True:
              _UpperCAmelCase    :		str     	=					input(""">> """						)
              if prompt in {"exit", "quit"}:
                     break

              try:
                     _UpperCAmelCase    :		int     	=					int(lowerCAmelCase_						)
              except ValueError:
                     print("""Enter a number or 'exit'"""						)
                     continue

              print(fibonacci.get(lowerCAmelCase_						)						)


if __name__ == "__main__":
   main()








'''simple docstring'''






def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						Union[str, Any]:





       '''simple docstring'''


       if n < 0:
              return 0
       # table[i] represents the number of ways to get to amount i
       _UpperCAmelCase    :		Union[str, Any]     	=					[0] * (n + 1)

       # There is exactly 1 way to get to zero(You pick no coins).
       _UpperCAmelCase    :		Optional[int]     	=					1

       # Pick all coins one by one and update table[] values
       # after the index greater than or equal to the value of the
       # picked coin
       for coin_val in s:
              for j in range(lowerCAmelCase_			,  n + 1						):
                     table[j] += table[j - coin_val]

       return table[n]


if __name__ == "__main__":
   import doctest

   doctest.testmod()



