#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int maxn = 200000 + 100;
long long dp[maxn][2];
long long dif[maxn];
int n;
long long x, y;
vector<int> G[maxn];
void dfs(int u, int fa) {
  int son = 0;
  long long sum0 = 0;
  long long Min = INF;
  long long SecMin = INF;
  for (int i = 0; i < G[u].size(); ++i) {
    int v = G[u][i];
    if (v != fa) {
      dfs(v, u);
      son++;
      sum0 += dp[v][0];
      if (dif[v] < Min) {
        SecMin = Min;
        Min = dif[v];
      } else if (dif[v] < SecMin) {
        SecMin = dif[v];
      }
    }
  }
  if (son == 0) {
    dp[u][1] = dp[u][0] = 0;
    dif[u] = 0;
    return;
  }
  dp[u][1] = sum0 + Min + x + y * (son - 1);
  dp[u][0] = sum0 + y * (son - 1) + y;
  dp[u][0] = min(dp[u][0], sum0 + y * (son - 1) + x + Min);
  if (son >= 2) {
    dp[u][0] = min(dp[u][0], sum0 + y * (son - 2) + 2 * x + Min + SecMin);
  }
  dif[u] = dp[u][1] - dp[u][0];
}
int degree[maxn];
int main() {
  scanf("%d %lld %lld", &n, &x, &y);
  memset(degree, 0, sizeof(degree));
  for (int i = 0; i < n - 1; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    G[a].push_back(b);
    G[b].push_back(a);
    degree[a]++;
    degree[b]++;
  }
  if (n == 1) {
    puts("0");
    return 0;
  }
  if (x >= y) {
    int cnt = 0;
    for (int i = 1; i <= n; ++i)
      if (degree[i] == 1) cnt++;
    long long res;
    if (cnt >= n - 1)
      res = y * (n - 2) + x;
    else
      res = y * (n - 1);
    printf("%lld\n", res);
    return 0;
  }
  dfs(1, -1);
  long long res = min(dp[1][0], dp[1][1]);
  printf("%lld\n", res);
  return 0;
}
