#include <bits/stdc++.h>
using namespace std;
const int maxn = 200006;
vector<int> g[maxn];
int x, y;
long long dp[maxn], dp1[maxn];
void dfs(int u, int pa) {
  vector<long long> gg;
  int w = (int)g[u].size();
  int p = 0;
  long long ss = 0;
  int tot = 0;
  for (int i = 0; i < w; i++) {
    if (g[u][i] != pa) {
      dfs(g[u][i], u);
      ss += dp1[g[u][i]] + y;
      p++;
      if (dp1[g[u][i]] + y > dp[g[u][i]] + x) {
        gg.push_back(dp[g[u][i]] + x - (dp1[g[u][i]] + y));
        tot++;
      }
    }
  }
  sort(gg.begin(), gg.end());
  if (p) {
    if (tot) {
      dp[u] = ss + gg[0];
      if (tot == 1) {
        ss += gg[0];
      } else {
        ss += gg[0] + gg[1];
      }
      dp1[u] = ss;
    } else {
      dp[u] = dp1[u] = ss;
    }
  } else {
    dp1[u] = 0;
    dp[u] = 0;
  }
  gg.clear();
}
int a[maxn];
int main() {
  int i, n;
  cin >> n >> x >> y;
  for (i = 0; i < n - 1; i++) {
    int xx, yy;
    scanf("%d%d", &xx, &yy);
    g[xx].push_back(yy);
    g[yy].push_back(xx);
    a[xx]++;
    a[yy]++;
  }
  int f = 0;
  for (i = 1; i <= n; i++) {
    if (a[i] == n - 1) {
      f = 1;
    }
  }
  if (x > y) {
    if (n == 2)
      cout << x << endl;
    else if (n == 3)
      cout << x + y << endl;
    else if (!f)
      cout << (long long)(n - 1) * y << endl;
    else
      cout << (long long)(n - 2) * y + x << endl;
    return 0;
  }
  dfs(1, 1);
  cout << dp1[1];
}
