#include <bits/stdc++.h>
using namespace std;
int x, y, n, m, de[200010], ecnt;
long long ans;
struct edge {
  int v;
  edge *next;
} * head[200010], E[200010 << 1];
void addedge(int u, int v) {
  edge *p = &E[++ecnt];
  p->v = v;
  p->next = head[u];
  head[u] = p;
}
bool dfs(int u, int fu) {
  int nw(0);
  for (edge *p = head[u]; p; p = p->next)
    if (p->v != fu) {
      bool flg = dfs(p->v, u);
      if (flg && nw < 2) m++;
      nw += flg;
    }
  return nw < 2;
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  int u, v;
  for (int i = 1; i < n; i++) {
    scanf("%d%d", &u, &v);
    de[u]++;
    de[v]++;
    addedge(u, v);
    addedge(v, u);
  }
  if (y <= x) {
    int flg(0);
    ans = 1LL * y * (n - 1);
    for (int i = 1; i <= n; i++)
      if (de[i] == n - 1) {
        flg = 1;
        break;
      }
    if (flg) ans = ans - y + x;
  } else {
    dfs(1, 0);
    ans = 1LL * x * m + 1LL * y * (n - 1 - m);
  }
  printf("%I64d", ans);
}
