#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0LL) return b;
  return gcd(b, a % b);
}
const int N = 300005;
long long dist[N], fur[N], sz[N];
bool found[N], flag;
int n;
vector<int> path;
vector<pair<int, int> > v[N];
void dfs(int u, int p) {
  sz[u] = 1;
  if (u == n) found[u] = true;
  int pt;
  long long w;
  for (int i = 0; i < v[u].size(); i++) {
    pt = v[u][i].first;
    w = v[u][i].second;
    if (pt != p) {
      dist[pt] = dist[u] + w;
      dfs(pt, u);
      found[u] |= found[pt];
      if (!found[pt]) {
        fur[u] = max(fur[u], w + fur[pt]);
        sz[u] += sz[pt];
      }
    }
  }
  if (sz[u] > 2) flag = true;
  if (found[u]) path.push_back(u);
  return;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int m, a, b, w;
  cin >> n >> m;
  for (int i = 1; i < n; i++) {
    cin >> a >> b >> w;
    v[a].push_back(make_pair(b, w));
    v[b].push_back(make_pair(a, w));
  }
  flag = false;
  dfs(1, 1);
  reverse(path.begin(), path.end());
  long long ans = 0, max_fur = 0;
  for (int i = 1; i < path.size(); i++) {
    if (i == 1) {
      if (fur[path[i]] != 0LL)
        ans = max(ans, max_fur + dist[n] - dist[path[i]] + fur[path[i]]);
    } else
      ans = max(ans, max_fur + dist[n] - dist[path[i]] + fur[path[i]]);
    if (fur[path[i]] || fur[path[i - 1]])
      ans = max(ans, fur[path[i - 1]] + dist[path[i - 1]] + dist[n] -
                         dist[path[i]] + fur[path[i]]);
    max_fur = max(max_fur, fur[path[i - 1]] + dist[path[i - 1]]);
  }
  long long x;
  while (m--) {
    cin >> x;
    if (flag)
      cout << dist[n] << "\n";
    else
      cout << min(dist[n], ans + x) << "\n";
  }
  return 0;
}
