output_description: Print the maximum total number of ingredients that Snuke's N servings of
  Skewer Meal can hold.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
      L_1 L_2 ... L_{2N}
attempt: import numpy as np
  
  N, K = map(int, input().split())
  
  E = np.zeros((N, N), dtype=int)
  exit(0)
  
  Elist = []
  for e in range(N - 1):
      i, o = map(int, input().split())
      Elist.append((i - 1, o - 1))
      E[i - 1][o - 1] = 1
      E[o - 1][i - 1] = 1
  
  # print("N, K=", N, K)
  # for e in Elist:
  #     print(e[0], e[1])
  
  I = np.eye(N, dtype=int)
  
  # print("I=", I)
  
  ie = I
  for k in range(K):
      ie = ie + np.matmul(I, E)
  # print("I + IE =", ie)
  
  # withinK = np.count_nonzero(ie, axis=0)
  withinK = np.zeros(N, dtype=int)
  for i in range(N):
      for j in range(N):
          if ie[i][j] > 0:
              withinK[i] += 1
  # print("withinK=", withinK)
  maxBall = np.amax(withinK)
  # print("maxBall=", maxBall)
  solution = N - maxBall
  print(solution)
  
problem_description: Statement
  
  Snuke is having a barbeque party.
  
  At the party, he will make N servings of _Skewer Meal_.
  
  ![](https://agc001.contest.atcoder.jp/img/agc/001/Gg9pvPKw/abbq.png)
  
  Example of a serving of Skewer Meal
  
  He has a stock of 2N skewers, all of which will be used in Skewer Meal. The
  length of the i-th skewer is L_i. Also, he has an infinite supply of
  ingredients.
  
  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients
  onto those skewers. Let the length of the shorter skewer be x, then the
  serving can hold the maximum of x ingredients.
  
  What is the maximum total number of ingredients that his N servings of Skewer
  Meal can hold, if he uses the skewers optimally?
samples: [{"input": "2\n    1 3 1 2", "output": "3\n    \n\nIf he makes a serving using the first and third skewers, and another using the\nsecond and fourth skewers, each serving will hold 1 and 2 ingredients, for the\ntotal of 3.\n\n* * *"}, {"input": "5\n    100 1 2 3 14 15 58 58 58 29", "output": "135"}]