


'''simple docstring'''
import unittest

from knapsack import greedy_knapsack as kp
class    lowercase	(							unittest.TestCase					):

		"""simple docstring"""

		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							UpperCamelCase__   :Any												= [10, 20, 30, 40, 50, 60]
							UpperCamelCase__   :Optional[Any]												= [2, 4, 6, 8, 10, 12]
							UpperCamelCase__   :Union[str, Any]												= 100
							self.assertEqual(kp.calc_profit(_snake_case    ,   _snake_case    ,   _snake_case							)    ,   210							)




		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							self.assertRaisesRegex(_snake_case    ,   '''max_weight must greater than zero.'''							)




		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							self.assertRaisesRegex(_snake_case    ,   '''Weight can not be negative.'''							)




		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							self.assertRaisesRegex(_snake_case    ,   '''Profit can not be negative.'''							)




		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							self.assertRaisesRegex(_snake_case    ,   '''max_weight must greater than zero.'''							)




		def     lowerCAmelCase__				(		self							):

							'''simple docstring'''


							self.assertRaisesRegex(
							    _snake_case    ,   '''The length of profit and weight must be same.'''							)


if __name__ == "__main__":
		unittest.main()

from math import ceil


def     __lowerCAmelCase			(			a__ = 1001  )       ->  int:
				__a										=    1

				for i in range(1						,    int(ceil(n / 2.0  )  )  ):
								__a										=    2 * i + 1
								__a										=    2 * i
								__a										=    total + 4 * odd**2 - 6 * even

				return total


if __name__ == "__main__":
					import sys

					if len(sys.argv) == 1:
										print(solution())
					else:
										try:
															A     :	List[Any]    = int(sys.argv[1])
															print(solution(n))
										except ValueError:
															print('Invalid entry - please enter a number')