

"""simple docstring"""



from __future__ import annotations

from collections.abc import Callable

SCREAMING_SNAKE_CASE_					:	Optional[int]							  =						list[list[float | int]]





def  _snake_case     (    UpperCAmelCase_  :					Matrix					,   UpperCAmelCase_  :					Matrix			):
     A__										=  len(UpperCAmelCase_			)
     A__										=  [[0 for _ in range(size + 1			)] for _ in range(UpperCAmelCase_			)]
     A__										=  42
     A__										=  42
     A__										=  42
     A__										=  42
     A__										=  42
     A__										=  42

     for row in range(UpperCAmelCase_			):
          for col in range(UpperCAmelCase_			):
               A__										=  matrix[row][col]

          A__										=  vector[row][0]

     A__										=  0
     A__										=  0
     while row < size and col < size:
          # pivoting
          A__										=  max((abs(augmented[rowa][col]			), rowa) for rowa in range(UpperCAmelCase_					,   UpperCAmelCase_			)			)[
              1
          ]
          if augmented[pivot_row][col] == 0:
               col += 1
               continue
          else:
               A__			,				A__										=  augmented[pivot_row], augmented[row]

          for rowa in range(row + 1					,   UpperCAmelCase_			):
               A__										=  augmented[rowa][col] / augmented[row][col]
               A__										=  0
               for cola in range(col + 1					,   size + 1			):
                    augmented[rowa][cola] -= augmented[row][cola] * ratio

          row += 1
          col += 1

     # back substitution
     for col in range(1					,   UpperCAmelCase_			):
          for row in range(UpperCAmelCase_			):
               A__										=  augmented[row][col] / augmented[col][col]
               for cola in range(UpperCAmelCase_					,   size + 1			):
                    augmented[row][cola] -= augmented[col][cola] * ratio

    # round to get rid of numbers like 2.000000000000004
     return [
         [round(augmented[row][size] / augmented[row][row]					,   10			)] for row in range(UpperCAmelCase_			)
     ]





def  _snake_case     (    UpperCAmelCase_  :					list[int]			):
     A__										=  len(UpperCAmelCase_			)
     A__										=  [[0 for _ in range(UpperCAmelCase_			)] for _ in range(UpperCAmelCase_			)]
     A__										=  [[0] for _ in range(UpperCAmelCase_			)]
     A__										=  42
     A__										=  42
     A__										=  42
     A__										=  42

     for x_val, y_val in enumerate(UpperCAmelCase_			):
          for col in range(UpperCAmelCase_			):
               A__										=  (x_val + 1) ** (size - col - 1)
          A__										=  y_val

     A__										=  solve(UpperCAmelCase_					,   UpperCAmelCase_			)

     def interpolated_func(UpperCAmelCase_  :					int			) -> int:
          return sum(
              round(coeffs[x_val][0]			) * (var ** (size - x_val - 1))
              for x_val in range(UpperCAmelCase_			)			)

     return interpolated_func





def  _snake_case     (    UpperCAmelCase_  :					int			):
     return (
         1
         - variable
         + variable**2
         - variable**3
         + variable**4
         - variable**5
         + variable**6
         - variable**7
         + variable**8
         - variable**9
         + variable**10
     )





def  _snake_case     (    UpperCAmelCase_  :					Callable[[int], int] = question_function					,   UpperCAmelCase_  :					int = 10			):
     A__										=  [func(UpperCAmelCase_			) for x_val in range(1					,   order + 1			)]

     A__										=  [
         interpolate(data_points[:max_coeff]			) for max_coeff in range(1					,   order + 1			)
     ]

     A__										=  0
     A__										=  42
     A__										=  42

     for poly in polynomials:
          A__										=  1
          while func(UpperCAmelCase_			) == poly(UpperCAmelCase_			):
               x_val += 1

          ret += poly(UpperCAmelCase_			)

     return ret


if __name__ == "__main__":
 print(f"""{solution() = }""")









"""simple docstring"""



def  _snake_case     (    UpperCAmelCase_  :					int			):
     A__										=  1
     for i in range(1					,   num + 1			):
          fact *= i
     return fact





def  _snake_case     (    UpperCAmelCase_  :					int			):
     A__										=  0
     while number > 0:
          A__										=  number % 10
          sum_of_digits += last_digit
          A__										=  number // 10  # Removing the last_digit from the given number
     return sum_of_digits





def  _snake_case     (    UpperCAmelCase_  :					int = 100			):
     A__										=  factorial(UpperCAmelCase_			)
     A__										=  split_and_add(UpperCAmelCase_			)
     return result


if __name__ == "__main__":
 print(solution(int(input('Enter the Number: ').strip())))






