





class 	UpperCamelCase_							:


							def __init__(				self     :str				,					__A     :int		) -> Tuple:



									"""simple docstring"""



									SCREAMING_SNAKE_CASE__								=   n
									SCREAMING_SNAKE_CASE__								=   [None] * self.n
									SCREAMING_SNAKE_CASE__								=   0  # index of the first element
									SCREAMING_SNAKE_CASE__								=   0
									SCREAMING_SNAKE_CASE__								=   0


							def __len__(				self     :Dict		) -> int:



									"""simple docstring"""



									return self.size


							def   _snake_case	(				self     :Optional[int]		) -> bool:



									"""simple docstring"""



									return self.size == 0


							def   _snake_case	(				self     :Dict		) -> List[Any]:



									"""simple docstring"""



									return False if self.is_empty() else self.array[self.front]


							def   _snake_case	(				self     :str				,					__A     :Optional[int]		) -> Tuple:



									"""simple docstring"""



									if self.size >= self.n:
											raise Exception("""QUEUE IS FULL"""		)

									SCREAMING_SNAKE_CASE__								=   data
									SCREAMING_SNAKE_CASE__								=   (self.rear + 1) % self.n
									self.size += 1
									return self


							def   _snake_case	(				self     :Union[str, Any]		) -> str:



									"""simple docstring"""



									if self.size == 0:
											raise Exception("""UNDERFLOW"""		)

									SCREAMING_SNAKE_CASE__								=   self.array[self.front]
									SCREAMING_SNAKE_CASE__								=   None
									SCREAMING_SNAKE_CASE__								=   (self.front + 1) % self.n
									self.size -= 1
									return temp






def 					SCREAMING_SNAKE_CASE__				(							UpperCamelCase__:				List[str]     ):
		SCREAMING_SNAKE_CASE__								=   len(UpperCamelCase__     )
		SCREAMING_SNAKE_CASE__								=   sum(UpperCamelCase__     )

		SCREAMING_SNAKE_CASE__								=   [[False for x in range(s + 1     )] for y in range(n + 1     )]

		for i in range(1       , n + 1     ):
				SCREAMING_SNAKE_CASE__								=   True

		for i in range(1       , s + 1     ):
				SCREAMING_SNAKE_CASE__								=   False

		for i in range(1       , n + 1     ):
				for j in range(1       , s + 1     ):
						SCREAMING_SNAKE_CASE__								=   dp[i][j - 1]

						if arr[i - 1] <= j:
								SCREAMING_SNAKE_CASE__								=   dp[i][j] or dp[i - 1][j - arr[i - 1]]

		for j in range(int(s / 2     )       , -1       , -1     ):
				if dp[n][j] is True:
						SCREAMING_SNAKE_CASE__								=   s - 2 * j
						break

		return diff