
"""simple docstring"""




from __future__ import annotations

from random import random







class     lowercase:



     def __init__(							self     ,				__SCREAMING_SNAKE_CASE = None   )		->     List[Any]:







         """simple docstring"""



         a__		=			value
         a__		=			random()
         a__		=			None
         a__		=			None



     def __repr__(							self   )		->     str:







         """simple docstring"""



         from pprint import pformat

         if self.left is None and self.right is None:
             return f'\'{self.value}: {self.prior:.5}\''
         else:
             return pformat(
                 {f'{self.value}: {self.prior:.5}': (self.left, self.right)}     ,				indent=1   )




     def __str__(							self   )		->     str:







         """simple docstring"""



         a__		=			str(self.value   ) + ' '
         a__		=			str(self.left or ''   )
         a__		=			str(self.right or ''   )
         return value + left + right




def     __magic_name__		(					UpperCamelCase     :		Node | None							,		UpperCamelCase     :		int     )     ->						tuple[Node | None, Node | None]:
    if root is None:  # None tree is split into 2 Nones
        return None, None
    elif root.value is None:
        return None, None
    else:
        if value < root.value:
            a__	,     a__		=			split(root.left							,		UpperCamelCase     )
            return left, root
        else:
            a__	,     a__		=			split(root.right							,		UpperCamelCase     )
            return root, right



def     __magic_name__		(					UpperCamelCase     :		Node | None							,		UpperCamelCase     :		Node | None     )     ->						Node | None:
    if (not left) or (not right):  # If one node is None, return the other
        return left or right
    elif left.prior < right.prior:
        a__		=			merge(left.right							,		UpperCamelCase     )
        return left
    else:
        a__		=			merge(UpperCamelCase							,		right.left     )
        return right



def     __magic_name__		(					UpperCamelCase     :		Node | None							,		UpperCamelCase     :		int     )     ->						Node | None:
    a__		=			Node(UpperCamelCase     )
    a__	,     a__		=			split(UpperCamelCase							,		UpperCamelCase     )
    return merge(merge(UpperCamelCase							,		UpperCamelCase     )							,		UpperCamelCase     )



def     __magic_name__		(					UpperCamelCase     :		Node | None							,		UpperCamelCase     :		int     )     ->						Node | None:
    a__	,     a__		=			split(UpperCamelCase							,		value - 1     )
    a__	,     a__		=			split(UpperCamelCase							,		UpperCamelCase     )
    return merge(UpperCamelCase							,		UpperCamelCase     )



def     __magic_name__		(					UpperCamelCase     :		Node | None     )     ->						None:
    if not root:  # None
        return
    else:
        inorder(root.left     )
        print(root.value							,		end=','     )
        inorder(root.right     )



def     __magic_name__		(					UpperCamelCase     :		Node | None							,		UpperCamelCase     :		str     )     ->						Node | None:
    for arg in args.split():
        if arg[0] == "+":
            a__		=			insert(UpperCamelCase							,		int(arg[1:]     )     )

        elif arg[0] == "-":
            a__		=			erase(UpperCamelCase							,		int(arg[1:]     )     )

        else:
            print('Unknown command'     )

    return root



def     __magic_name__		(					)     ->						None:
    a__		=			None
    print(
        'enter numbers to create a tree, + value to add value into treap, '
        '- value to erase all nodes with value. \'q\' to quit. '     )

    a__		=			input()
    while args != "q":
        a__		=			interact_treap(UpperCamelCase							,		UpperCamelCase     )
        print(UpperCamelCase     )
        a__		=			input()

    print('good by!'     )


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    main()




"""simple docstring"""




from math import ceil



def     __magic_name__		(					UpperCamelCase     :		int = 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		:       Any     						=       int(sys.argv[1])
            print(solution(n))
        except ValueError:
            print('Invalid entry - please enter a number')


