






import unittest

from transformers.testing_utils import CaptureStdout
from transformers.tools.python_interpreter import evaluate


def 	lowerCamelCase__      (  lowercase					):

  """simple docstring"""






  return x + 2


class 			SCREAMING_SNAKE_CASE      (      unittest.TestCase       ):
     '''simple docstring'''


     def 					_A							(					self							:						List[str]   ):
       SCREAMING_SNAKE_CASE							:   Dict						    =     "x = 3"
       SCREAMING_SNAKE_CASE							:   int						    =     {}
       SCREAMING_SNAKE_CASE							:   str						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 3
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3}   )

       SCREAMING_SNAKE_CASE							:   Tuple						    =     "x = y"
       SCREAMING_SNAKE_CASE							:   Dict						    =     {"y": 5}
       SCREAMING_SNAKE_CASE							:   List[Any]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       # evaluate returns the value of the last assignment.
       assert result == 5
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 5, "y": 5}   )


     def 					_A							(					self							:						Optional[int]   ):
       SCREAMING_SNAKE_CASE							:   Optional[int]						    =     "y = add_two(x)"
       SCREAMING_SNAKE_CASE							:   List[str]						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   Any						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{"add_two": add_two}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 5
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "y": 5}   )

       # Won't work without the tool
       with CaptureStdout() as out:
         SCREAMING_SNAKE_CASE							:   Dict						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result is None
       assert "tried to execute add_two" in out.out


     def 					_A							(					self							:						Optional[int]   ):
       SCREAMING_SNAKE_CASE							:   Tuple						    =     "x = 3"
       SCREAMING_SNAKE_CASE							:   Optional[Any]						    =     {}
       SCREAMING_SNAKE_CASE							:   Tuple						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 3
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3}   )


     def 					_A							(					self							:						List[str]   ):
       SCREAMING_SNAKE_CASE							:   Any						    =     "test_dict = {\'x\': x, \'y\': add_two(x)}"
       SCREAMING_SNAKE_CASE							:   Optional[Any]						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   Union[str, Any]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{"add_two": add_two}       ,			state=__SCREAMING_SNAKE_CASE   )
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "y": 5}   )
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "test_dict": {"x": 3, "y": 5}}   )


     def 					_A							(					self							:						Optional[Any]   ):
       SCREAMING_SNAKE_CASE							:   Tuple						    =     "x = 3\ny = 5"
       SCREAMING_SNAKE_CASE							:   int						    =     {}
       SCREAMING_SNAKE_CASE							:   int						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       # evaluate returns the value of the last assignment.
       assert result == 5
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "y": 5}   )


     def 					_A							(					self							:						List[Any]   ):
       SCREAMING_SNAKE_CASE							:   Optional[Any]						    =     "text = f\'This is x: {x}.\'"
       SCREAMING_SNAKE_CASE							:   Optional[int]						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   Union[str, Any]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       # evaluate returns the value of the last assignment.
       assert result == "This is x: 3."
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "text": "This is x: 3."}   )


     def 					_A							(					self							:						Union[str, Any]   ):
       SCREAMING_SNAKE_CASE							:   Tuple						    =     "if x <= 3:\n    y = 2\nelse:\n    y = 5"
       SCREAMING_SNAKE_CASE							:   List[str]						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   List[str]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       # evaluate returns the value of the last assignment.
       assert result == 2
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "y": 2}   )

       SCREAMING_SNAKE_CASE							:   Optional[int]						    =     {"x": 8}
       SCREAMING_SNAKE_CASE							:   Tuple						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       # evaluate returns the value of the last assignment.
       assert result == 5
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 8, "y": 5}   )


     def 					_A							(					self							:						int   ):
       SCREAMING_SNAKE_CASE							:   Any						    =     "test_list = [x, add_two(x)]"
       SCREAMING_SNAKE_CASE							:   str						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   Tuple						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{"add_two": add_two}       ,			state=__SCREAMING_SNAKE_CASE   )
       self.assertListEqual(__SCREAMING_SNAKE_CASE       ,			[3, 5]   )
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "test_list": [3, 5]}   )


     def 					_A							(					self							:						Any   ):
       SCREAMING_SNAKE_CASE							:   List[Any]						    =     "y = x"
       SCREAMING_SNAKE_CASE							:   Tuple						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   Union[str, Any]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 3
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "y": 3}   )


     def 					_A							(					self							:						Union[str, Any]   ):
       SCREAMING_SNAKE_CASE							:   int						    =     "test_list = [x, add_two(x)]\ntest_list[1]"
       SCREAMING_SNAKE_CASE							:   List[str]						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   List[str]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{"add_two": add_two}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 5
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "test_list": [3, 5]}   )

       SCREAMING_SNAKE_CASE							:   Optional[int]						    =     "test_dict = {\'x\': x, \'y\': add_two(x)}\ntest_dict[\'y\']"
       SCREAMING_SNAKE_CASE							:   int						    =     {"x": 3}
       SCREAMING_SNAKE_CASE							:   Tuple						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{"add_two": add_two}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 5
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 3, "test_dict": {"x": 3, "y": 5}}   )






     def 					_A							(					self							:						Union[str, Any]   ):
       SCREAMING_SNAKE_CASE							:   Any						    =     "x = 0\nfor i in range(3):\n    x = i"
       SCREAMING_SNAKE_CASE							:   Optional[Any]						    =     {}
       SCREAMING_SNAKE_CASE							:   Union[str, Any]						    =     evaluate(__SCREAMING_SNAKE_CASE       ,			{"range": range}       ,			state=__SCREAMING_SNAKE_CASE   )
       assert result == 2
       self.assertDictEqual(__SCREAMING_SNAKE_CASE       ,			{"x": 2, "i": 2}   )












'''simple docstring'''



def       _UpperCamelCase			(_lowerCamelCase				:  int						)-> int:




     '''simple docstring'''





     __snake_case            =	[[0 for _ in range(_lowerCamelCase						)] for _ in range(m + 1						)]
     for i in range(m + 1						):
          __snake_case            =	1

     for n in range(m + 1						):
          for k in range(1 ,						_lowerCamelCase						):
               memo[n][k] += memo[n][k - 1]
               if n - k > 0:
                    memo[n][k] += memo[n - k - 1][k]

     return memo[m][m - 1]


if __name__ == "__main__":
     import sys

     if len(sys.argv) == 1:
          try:
               UpperCAmelCase_							:	List[str]	     =		int(input('''Enter a number: ''').strip())
               print(partition(n))
          except ValueError:
               print('''Please enter a number.''')
     else:
          try:
               UpperCAmelCase_							:	Union[str, Any]	     =		int(sys.argv[1])
               print(partition(n))
          except ValueError:
               print('''Please pass a number.''')






