#include <bits/stdc++.h>
using namespace std;
long long n;
struct node {
  vector<long long> adj;
  long long DP;
};
node g[200005];
long long goDP(long long curr, long long parent) {
  long long sumKids = 0;
  long long limit = g[curr].adj.size();
  if (limit == 1) {
    g[curr].DP = 0;
  }
  long long validKids = 0;
  for (long long i = 0; i <= limit - 1; i++) {
    long long nxt = g[curr].adj[i];
    if (nxt == parent) continue;
    sumKids += goDP(nxt, curr);
    if (g[nxt].DP < 2LL) validKids++;
  }
  g[curr].DP = min(validKids, 2LL);
  return sumKids + g[curr].DP;
}
long long poj[200005];
long long x, y;
int main() {
  scanf("%lld %lld %lld", &n, &y, &x);
  for (long long i = 1; i <= n - 1; i++) {
    long long u, v;
    scanf("%lld %lld", &u, &v);
    g[u].adj.push_back(v);
    g[v].adj.push_back(u);
    poj[u]++;
    poj[v]++;
  }
  if (n == 2) {
    printf("%lld\n", y);
    return 0;
  }
  if (n == 3) {
    printf("%lld\n", min(x + y, 2 * y));
    return 0;
  }
  if (y > x) {
    bool star = false;
    for (long long i = 1; i <= n; i++) {
      if (poj[i] == n - 1) star = true;
    }
    if (star) {
      printf("%lld\n", x * (n - 2) + y);
      return 0;
    } else {
      printf("%lld\n", x * (n - 1));
      return 0;
    }
  } else {
    long long maxYS = goDP(1, -1);
    printf("%lld\n", maxYS * y + (n - 1 - maxYS) * x);
    return 0;
  }
  return 0;
}
