




from __future__ import annotations

from typing import Generic, TypeVar

__a          =			TypeVar('T')

class   __a(					Generic[T]       ):






    """simple docstring"""





    def __init__(				self       ,_SCREAMING_SNAKE_CASE  )			->		None:
         UpperCAmelCase_      :							List[str]       =      data
         UpperCAmelCase_      :							Optional[int]       =      self
         UpperCAmelCase_      :							str       =      0


class   __a(					Generic[T]       ):






    """simple docstring"""





    def __init__(				self  )			->		None:
         # map from node name to the node object
         UpperCAmelCase_      :							dict[T, DisjointSetTreeNode[T]]       =      {}





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE  )			->		None:
         # create a new set with x as its member
         UpperCAmelCase_      :							Any       =      DisjointSetTreeNode(_SCREAMING_SNAKE_CASE  )





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE  )			->		DisjointSetTreeNode[T]:
         # find the set x belongs to (with path-compression)
         UpperCAmelCase_      :							List[Any]       =      self.map[data]
         if elem_ref != elem_ref.parent:
              UpperCAmelCase_      :							List[str]       =      self.find_set(elem_ref.parent.data  )
         return elem_ref.parent





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		None:
         # helper function for union operation
         if nodea.rank > nodea.rank:
              UpperCAmelCase_      :							List[str]       =      nodea
         else:
              UpperCAmelCase_      :							List[Any]       =      nodea
              if nodea.rank == nodea.rank:
                   nodea.rank += 1





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		None:
         # merge 2 disjoint sets
         self.link(self.find_set(_SCREAMING_SNAKE_CASE  )       ,self.find_set(_SCREAMING_SNAKE_CASE  )  )


class   __a(					Generic[T]       ):






    """simple docstring"""





    def __init__(				self  )			->		None:
         # connections: map from the node to the neighbouring nodes (with weights)
         UpperCAmelCase_      :							dict[T, dict[T, int]]       =      {}





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE  )			->		None:
         # add a node ONLY if its not present in the graph
         if node not in self.connections:
              UpperCAmelCase_      :							Optional[int]       =      {}





    def 							a__				(				self       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )			->		None:
         # add an edge with the given weight
         self.add_node(_SCREAMING_SNAKE_CASE  )
         self.add_node(_SCREAMING_SNAKE_CASE  )
         UpperCAmelCase_      :							Dict       =      weight
         UpperCAmelCase_      :							Tuple       =      weight





    def 							a__				(				self  )			->		GraphUndirectedWeighted[T]:
         UpperCAmelCase_      :							Any       =      []
         UpperCAmelCase_      :							Union[str, Any]       =      set()
         for start in self.connections:
              for end in self.connections[start]:
                   if (start, end) not in seen:
                        seen.add((end, start)  )
                        edges.append((start, end, self.connections[start][end])  )
         edges.sort(key=lambda _SCREAMING_SNAKE_CASE  : x[2]  )

         # creating the disjoint set
         UpperCAmelCase_      :							List[str]       =      DisjointSetTree[T]()
         for node in self.connections:
              disjoint_set.make_set(_SCREAMING_SNAKE_CASE  )

         # MST generation
         UpperCAmelCase_      :							List[Any]       =      0
         UpperCAmelCase_      :							List[str]       =      0
         UpperCAmelCase_      :							Dict       =      GraphUndirectedWeighted[T]()
         while num_edges < len(self.connections  ) - 1:
              UpperCAmelCase_,   UpperCAmelCase_,   UpperCAmelCase_      :							Tuple       =      edges[index]
              index += 1
              UpperCAmelCase_      :							int       =      disjoint_set.find_set(_SCREAMING_SNAKE_CASE  )
              UpperCAmelCase_      :							int       =      disjoint_set.find_set(_SCREAMING_SNAKE_CASE  )
              if parent_u != parent_v:
                   num_edges += 1
                   graph.add_edge(_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )
                   disjoint_set.union(_SCREAMING_SNAKE_CASE       ,_SCREAMING_SNAKE_CASE  )
         return graph





from math import ceil







def lowerCamelCase__       (      _lowercase = 1001				):

     '''simple docstring'''


     UpperCAmelCase_      :							Optional[Any]       =      1

     for i in range(1			,						int(ceil(n / 2.0				)				)				):
          UpperCAmelCase_      :							List[Any]       =      2 * i + 1
          UpperCAmelCase_      :							Optional[int]       =      2 * i
          UpperCAmelCase_      :							Any       =      total + 4 * odd**2 - 6 * even

     return total


if __name__ == "__main__":
     import sys

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