




"""simple docstring"""


import math


def 					UpperCAmelCase__       (snake_case__							:					int = 1_00    ):
  """simple docstring"""

  _snake_case							:		str								=  sum(i * i for i in range(1		,   n + 1    )    )
  _snake_case							:		Tuple								=  int(math.pow(sum(range(1		,   n + 1    )    )		,   2    )    )
  return square_of_sum - sum_of_squares


if __name__ == "__main__":
     print(F'''{solution() = }''')




"""simple docstring"""



from __future__ import annotations

from bisect import bisect_left
from functools import total_ordering
from heapq import merge

@total_ordering
class       lowerCAmelCase__				(						A_	):







     def __lt__(							self			:			Any    ,      _lowerCamelCase			:			int			):
       return self[-1] < other[-1]







     def __eq__(							self			:			int    ,      _lowerCamelCase			:			Optional[Any]			):
       return self[-1] == other[-1]






def 					_UpperCAmelCase      ( __lowerCamelCase   :       list		)     ->					list:
  _snake_case					     =       []
  # sort into stacks
  for element in collection:
    _snake_case					     =       Stack([element]		)
    _snake_case					     =       bisect_left(__lowerCamelCase ,					__lowerCamelCase		)
    if i != len(__lowerCamelCase		):
      stacks[i].append(__lowerCamelCase		)
    else:
      stacks.append(__lowerCamelCase		)

    # use a heap-based merge to merge stack efficiently
  _snake_case					     =       merge(*(reversed(__lowerCamelCase		) for stack in stacks)		)
  return collection


if __name__ == "__main__":
 UpperCAmelCase__          = input('Enter numbers separated by a comma:\n').strip()
 UpperCAmelCase__          = [int(item) for item in user_input.split(',')]
 print(patience_sort(unsorted))



