#include <bits/stdc++.h>
using namespace std;
int n, x, y, head[200010], cnt, num, du[200010];
struct edge {
  int to, next;
} e[400010];
inline void insert(int u, int v) {
  e[++cnt].to = v, e[cnt].next = head[u], head[u] = cnt;
}
inline int dfs(int u, int fa) {
  int tot = 0;
  for (int i = head[u]; i; i = e[i].next) {
    int v = e[i].to;
    if (v == fa) continue;
    if (dfs(v, u)) tot++;
  }
  if (tot <= 1) {
    num += tot;
    return 1;
  } else {
    num += 2;
    return 0;
  }
}
int main() {
  scanf("%d%d%d", &n, &x, &y);
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    insert(u, v);
    insert(v, u);
    du[u]++;
    du[v]++;
  }
  if (x >= y) {
    for (int i = 1; i <= n; i++) {
      if (du[i] == n - 1) {
        printf("%lld\n", (long long)y * (n - 2) + x);
        return 0;
      }
    }
    printf("%lld\n", (long long)y * (n - 1));
  } else {
    dfs(1, 0);
    printf("%lld\n", (long long)(n - 1 - num) * y + (long long)num * x);
  }
  return 0;
}
