#include <bits/stdc++.h>
using namespace std;
template <typename T>
T nextInt() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') {
    p = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + (ch - '0');
    ch = getchar();
  }
  return x * p;
}
const int maxN = (int)2e5 + 10;
const int INF = (int)1e9;
const int mod = (int)1e9 + 7;
const long long LLINF = (long long)1e18;
const long double pi = acos(-1.0);
vector<int> g[maxN];
int n, x, y;
long long dp[maxN][2];
void dfs(int v, int p = -1) {
  if (p != -1) g[v].erase(find(g[v].begin(), g[v].end(), p));
  vector<int> kek;
  long long sum0 = 0;
  long long sum1 = 0;
  for (int x : g[v]) {
    dfs(x, v);
    sum0 += dp[x][0];
    sum1 += dp[x][1];
    kek.push_back(dp[x][0] - dp[x][1]);
  }
  sort(kek.begin(), kek.end());
  dp[v][0] = INF;
  dp[v][1] = INF;
  if ((int)kek.size() == 0) {
    dp[v][0] = 1;
    dp[v][1] = 1;
  }
  if ((int)kek.size() >= 1) {
    for (int x : g[v]) {
      dp[v][0] = min(dp[v][0], dp[x][0] + sum1 - dp[x][1]);
    }
  }
  dp[v][1] = dp[v][0];
  if ((int)kek.size() >= 2) {
    dp[v][1] = min(dp[v][1], sum1 + kek[0] + kek[1] - 1);
  }
}
int main() {
  n = nextInt<int>();
  x = nextInt<int>();
  y = nextInt<int>();
  for (int i = 0; i < n - 1; ++i) {
    int x = nextInt<int>() - 1;
    int y = nextInt<int>() - 1;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  int a, b;
  if (x > y) {
    bool isStar = false;
    for (int i = 0; i < n; ++i) {
      isStar |= (int)g[i].size() == n - 1;
    }
    a = 0;
    b = n - 1;
    if (isStar) b--, a++;
  } else {
    dfs(0);
    b = min(dp[0][0], dp[0][1]) - 1;
    a = n - 1 - b;
  }
  printf("%I64d\n", a * 1LL * x + b * 1LL * y);
  return 0;
}
