#include <bits/stdc++.h>
using namespace std;
int maxx(int a, int b) { return a > b ? a : b; }
int minn(int a, int b) { return a < b ? a : b; }
const int maxn = 2e5 + 10;
int N, X, Y;
int edge[2 * maxn][3];
int last[maxn];
int otd[maxn];
bool have[maxn];
long long ans;
int cnt;
int DP(int, int);
void adde(int, int, int);
int main() {
  scanf("%d%d%d", &N, &X, &Y);
  for (int i = 1; i < N; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adde(u, v, i);
    adde(v, u, i + N);
  }
  if (X >= Y) {
    bool tricky = 0;
    for (int i = 1; i <= N; i++)
      if (otd[i] == N - 1) {
        tricky = 1;
        break;
      }
    if (tricky) ans = X - Y;
    ans += (long long)Y * (N - 1);
  } else {
    DP(1, 0);
    ans = (long long)(N - 1 - cnt) * Y + (long long)cnt * X;
  }
  printf("%I64d", ans);
  return 0;
}
void adde(int u, int v, int i) {
  edge[i][0] = u;
  edge[i][1] = v;
  edge[i][2] = last[u];
  last[u] = i;
  otd[u]++;
}
int DP(int u, int f) {
  int ncnt = 0;
  for (int e = last[u]; e; e = edge[e][2]) {
    int v = edge[e][1];
    if (v == f) continue;
    ncnt += DP(v, u);
  }
  if (ncnt >= 2) {
    cnt += 2;
    return 0;
  }
  if (ncnt == 1) cnt += 1;
  return 1;
}
