#include <bits/stdc++.h>
using namespace std;
int n, A, B, dp[200000][2];
vector<vector<int> > g;
int calc(int u, bool is, int p = -1) {
  int &ret = dp[u][is];
  if (ret != -1) return ret;
  ret = 0;
  for (int i = 0; i < g[u].size(); ++i)
    if (g[u][i] != p) ret += calc(g[u][i], false, u);
  int all = ret;
  int mx1 = -1, mx2 = -1;
  for (int i = 0; i < g[u].size(); ++i)
    if (g[u][i] != p) {
      int cur = calc(g[u][i], true, u) - calc(g[u][i], false, u);
      if (cur > mx1) {
        mx1 = cur;
        swap(mx1, mx2);
      }
      ret =
          max(ret, all - calc(g[u][i], false, u) + calc(g[u][i], true, u) + 1);
    }
  if (!is && mx1 != -1) ret = max(ret, all + 2 + mx1 + mx2);
  return ret;
}
long long DP[18][1 << 18];
int cost[18][18];
long long calc(int u, int mask) {
  if (mask + 1 == (1 << n)) return 0;
  long long &ret = DP[u][mask];
  if (ret != -1) return ret;
  ret = 1e18;
  for (int i = 0; i < n; ++i)
    if (!((mask >> i) & 1))
      ret = min(ret, cost[u][i] + calc(i, mask | (1 << i)));
  return ret;
}
int main() {
  scanf("%d%d%d", &n, &A, &B);
  if (A >= B) {
    if (n > 18) {
      int need = 0;
      vector<int> in(n);
      for (int i = 1, a, b; i < n; ++i) {
        scanf("%d%d", &a, &b);
        --a;
        --b;
        ++in[a];
        ++in[b];
        if (in[a] == n - 1 || in[b] == n - 1) need = 1;
      }
      cout << (long long)(n - 1 - need) * (long long)B + need * A << endl;
    } else {
      memset(DP, -1, sizeof(DP));
      for (int i = 0; i < n; ++i)
        for (int j = 0; j < n; ++j) {
          cost[i][j] = B;
          cost[i][i] = 0;
        }
      for (int i = 1, a, b; i < n; ++i) {
        scanf("%d%d", &a, &b);
        --a;
        --b;
        cost[a][b] = cost[b][a] = A;
      }
      long long res = 1e18;
      for (int i = 0; i < n; ++i) res = min(res, calc(i, 1 << i));
      cout << res << endl;
    }
    return 0;
  }
  g.resize(n);
  for (int i = 1, a, b; i < n; ++i) {
    scanf("%d%d", &a, &b);
    --a;
    --b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  memset(dp, -1, sizeof(dp));
  long long can = calc(0, false);
  cout << ((long long)n - 1 - can) * B + can * A << endl;
  return 0;
}
