#include <bits/stdc++.h>
using namespace std;
const int iinf = 1e9 + 7;
const long long linf = 1ll << 60;
const double dinf = 1e10;
void scf(int &x) {
  bool f = 0;
  x = 0;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') {
    f = 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  if (f) x = -x;
  return;
}
void scf(int &x, int &y) {
  scf(x);
  return scf(y);
}
void scf(int &x, int &y, int &z) {
  scf(x);
  scf(y);
  return scf(z);
}
const int N = 2e5 + 100;
struct edge {
  int to, nxt;
  edge() {}
  edge(int t, int n) {
    to = t;
    nxt = n;
  }
} e[N << 1];
int head[N], etot;
int n;
long long x, y;
int dp[N][3], cst[N], mx[N];
inline void add_edge(int u, int v) {
  etot++;
  e[etot] = edge(v, head[u]);
  head[u] = etot;
  etot++;
  e[etot] = edge(u, head[v]);
  head[v] = etot;
  return;
}
inline int MAX(int a, int b) { return a > b ? a : b; }
inline int MAX(int a, int b, int c) { return MAX(MAX(a, b), c); }
inline void dfs(int u = 1, int f = 0) {
  int m1, m2;
  m1 = m2 = iinf;
  for (int i = head[(u)]; i; i = e[(i)].nxt) {
    int v = e[i].to;
    if (v == f) continue;
    dfs(v, u);
    dp[u][0] += mx[v];
    if (cst[v] < m1)
      m2 = m1, m1 = cst[v];
    else if (cst[v] < m2)
      m2 = cst[v];
  }
  if (m1 != iinf) {
    dp[u][1] = dp[u][0] - m1 + 1;
    if (m2 != iinf) dp[u][2] = dp[u][1] - m2 + 1;
  }
  mx[u] = MAX(dp[u][0], dp[u][1], dp[u][2]);
  cst[u] = mx[u] - MAX(dp[u][0], dp[u][1]);
  return;
}
int main() {
  scf(n);
  scanf("%I64d%I64d", &x, &y);
  for (int i = 0; i < (n - 1); i++) {
    int u, v;
    scf(u, v);
    add_edge(u, v);
  }
  if (x >= y) {
    for (int u = (1); u <= (n); u++) {
      int cnt = 0;
      for (int i = head[(u)]; i; i = e[(i)].nxt) cnt++;
      if (cnt == n - 1) {
        printf("%I64d\n", y * (long long)(n - 2) + x);
        return 0;
      }
    }
    printf("%I64d\n", y * (long long)(n - 1));
    return 0;
  }
  dfs();
  printf("%I64d\n", (long long)mx[1] * x + (long long)(n - 1 - mx[1]) * y);
  return 0;
}
