Problem: There are n cities in the country of Berland. Some of them are connected by bidirectional roads in such a way that there exists exactly one path, which visits each road no more than once, between every pair of cities. Each road has its own length. Cities are numbered from 1 to n.

The travelling time between some cities v and u is the total length of the roads on the shortest path from v to u. 

The two most important cities in Berland are cities 1 and n.

The Berland Ministry of Transport decided to build a single new road to decrease the traffic between the most important cities. However, lots of people are used to the current travelling time between the most important cities, so the new road shouldn't change it too much. 

The new road can only be built between such cities v and u that v ≠ u and v and u aren't already connected by some road.

They came up with m possible projects. Each project is just the length x of the new road.

Polycarp works as a head analyst at the Berland Ministry of Transport and it's his job to deal with all those m projects. For the i-th project he is required to choose some cities v and u to build the new road of length x_i between such that the travelling time between the most important cities is maximal possible. 

Unfortunately, Polycarp is not a programmer and no analyst in the world is capable to process all projects using only pen and paper. 

Thus, he asks you to help him to calculate the maximal possible travelling time between the most important cities for each project. Note that the choice of v and u can differ for different projects.

Input

The first line contains two integers n and m (3 ≤ n ≤ 3 ⋅ 10^5, 1 ≤ m ≤ 3 ⋅ 10^5) — the number of cities and the number of projects, respectively.

Each of the next n - 1 lines contains three integers v_i, u_i and w_i (1 ≤ v_i, u_i ≤ n, 1 ≤ w_i ≤ 10^9) — the description of the i-th road. It is guaranteed that there exists exactly one path, which visits each road no more than once, between every pair of cities.

Each of the next m lines contains a single integer x_j (1 ≤ x_j ≤ 10^9) — the length of the road for the j-th project.

Output

Print m lines, the j-th line should contain a single integer — the maximal possible travelling time between the most important cities for the j-th project.

Example

Input

7 2
1 2 18
2 3 22
3 4 24
4 7 24
2 6 4
3 5 12
1
100


Output

83
88

Note

The road network from the first example:

<image>

You can build the road with length 1 between cities 5 and 6 to get 83 as the travelling time between 1 and 7 (1 → 2 → 6 → 5 → 3 → 4 → 7 = 18 + 4 + 1 + 12 + 24 + 24 = 83). Other possible pairs of cities will give answers less or equal to 83.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using std::map;
using std::max;
using std::min;
using std::pair;
using std::set;
using std::sort;
using std::vector;
namespace IO_base {
const int MAXB = 1 << 10;
char gbuf[MAXB], *ps = gbuf, *pt = gbuf;
char pbuf[MAXB + 1], *pp = pbuf;
struct Flusher {
  ~Flusher() { fwrite(pbuf, 1, pp - pbuf, stdout); }
} flusher;
inline char Getchar() {
  if (ps == pt) {
    ps = gbuf;
    pt = gbuf + fread(gbuf, 1, MAXB, stdin);
  }
  return (ps == pt) ? EOF : *ps++;
}
inline void Putchar(const char &ch) {
  if (pp == pbuf + MAXB) {
    pp = pbuf;
    fwrite(pbuf, 1, MAXB, stdout);
  }
  *pp++ = ch;
}
}  // namespace IO_base
namespace IO_number {
int read() {
  int x = 0;
  char c = IO_base::Getchar();
  bool f = 0;
  while (c < '0' || c > '9')
    (c == '-') ? f = 1, c = IO_base::Getchar() : c = IO_base::Getchar();
  while (c >= '0' && c <= '9')
    x = (x << 1) + (x << 3) + (48 ^ c), c = IO_base::Getchar();
  return (f) ? -x : x;
}
void write(const long long &x) {
  if (x < 0) {
    IO_base::Putchar('-');
    write(-x);
  } else {
    if (x / 10) write(x / 10);
    IO_base::Putchar('0' + x % 10);
  }
}
}  // namespace IO_number
using namespace IO_number;
namespace Graph {
struct edge {
  int to, nxt, w;
  edge(const int &_to, const int &_nxt, const int &_w)
      : to(_to), nxt(_nxt), w(_w) {}
};
vector<int> first;
vector<edge> e(1, edge(0, 0, 0));
inline void addedge(const int &u, const int &v, const int &w) {
  e.push_back(edge(v, first[u], w)), first[u] = e.size() - 1;
  e.push_back(edge(u, first[v], w)), first[v] = e.size() - 1;
}
}  // namespace Graph
using namespace Graph;
struct node {
  long long to_1, to_n;
  int node_number;
  node() {}
  node(const long long &_to_1, const long long &_to_n, const int &_node_number)
      : to_1(_to_1), to_n(_to_n), node_number(_node_number) {}
};
vector<node> dp;
void dfs_dp(const int &u, const int &fa, const char &typ) {
  dp[u].node_number = u;
  for (int l = first[u]; l; l = e[l].nxt)
    if (e[l].to != fa) {
      if (typ == '1')
        dp[e[l].to].to_1 = dp[u].to_1 + e[l].w;
      else
        dp[e[l].to].to_n = dp[u].to_n + e[l].w;
      dfs_dp(e[l].to, u, typ);
    }
}
int main() {
  const int n = read(), m = read();
  first.resize(n + 1);
  e.reserve(2 * (n - 1) + 1);
  vector<set<int> > e_(n + 1, set<int>());
  for (int i = 0; i < n - 1; ++i) {
    const int u = read(), v = read(), w = read();
    addedge(u, v, w);
    e_[u].insert(v), e_[v].insert(u);
  }
  dp = vector<node>(n + 1, node(0, 0, 0));
  dfs_dp(1, 0, '1'), dfs_dp(n, 0, 'n');
  long long ans_ = dp[n].to_1;
  sort(dp.begin() + 1, dp.end(), [&](const node &A, const node &B) {
    return A.to_1 - A.to_n < B.to_1 - B.to_n;
  });
  map<long long, int> Map;
  long long ans = 0;
  for (int i = n; i >= 1; --i) {
    auto it = Map.begin();
    while (it != Map.end() &&
           e_[dp[i].node_number].count(dp[it->second].node_number))
      ++it;
    if (it != Map.end()) ans = max(ans, dp[i].to_1 + dp[it->second].to_n);
    Map.insert(pair<long long, int>(-dp[i].to_n, i));
  }
  for (int _t = 0; _t < m; ++_t)
    write(min(ans_, ans + read())), IO_base::Putchar('\n');
}