



from __future__ import annotations


def 						UpperCAmelCase__   (   UpperCAmelCase__			:list       ):






 '''simple docstring'''

 a							=		sorted(UpperCAmelCase__       )
 a							=		len(UpperCAmelCase__       )
 a							=		length >> 1
 return (
     (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
     if length % 2 == 0
     else sorted_list[mid_index]
 )


def 						UpperCAmelCase__   (   ):






 '''simple docstring'''

 import doctest

 doctest.testmod()


if __name__ == "__main__":
     main()







def   A		(__A  :       int			)  -> int:







     """simple docstring"""


     if not isinstance(__A  ,							__A			):
          UpperCAmelCase_		=				F"""Input value of [number={number}] must be an integer"""
          raise TypeError(__A			)
     if number < 1:
          raise ValueError('''Input must be a positive integer'''			)
     return number * (2 * number - 1)


if __name__ == "__main__":
    import doctest

    doctest.testmod()






