#include <bits/stdc++.h>
using namespace std;
int n;
long long x, y;
vector<int> v[200005];
int cnt[200005];
void init() {
  scanf("%d%I64d%I64d", &n, &x, &y);
  for (int i = 1; i < n; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
    cnt[a]++, cnt[b]++;
  }
}
bool vis[200005];
int dp[200005], mk[200005];
void dfs(int idx) {
  int chd = 0;
  dp[idx] = 1;
  for (int nxt : v[idx])
    if (!vis[nxt]) {
      vis[nxt] = true;
      dfs(nxt);
      dp[idx] += dp[nxt];
      if (mk[nxt] == 0) chd++;
    }
  if (chd >= 2)
    dp[idx] -= 2, mk[idx] = 1;
  else if (chd == 1)
    dp[idx] -= 1;
}
void solve() {}
void process() {
  if (x >= y) {
    bool flg = false;
    for (int i = 1; i <= n; i++)
      if (cnt[i] == n - 1) flg = true;
    if (flg)
      printf("%I64d\n", y * (n - 2) + x);
    else
      printf("%I64d\n", y * (n - 1));
  } else {
    vis[1] = true;
    dfs(1);
    printf("%I64d\n", y * (dp[1] - 1) + x * (n - dp[1]));
  }
}
int main() {
  init();
  process();
  return 0;
}
