#include <bits/stdc++.h>
using namespace std;
const long long maxl = 200005;
long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -w;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    s = (s << 1) + (s << 3) + (ch ^ '0');
    ch = getchar();
  }
  return s * w;
}
long long n, x, y, cnt, tree_edges_count, maxv_degree, ans;
long long head[maxl], de[maxl];
struct edge {
  long long nxt, to;
} e[maxl << 1];
void add_edge(long long u, long long v) {
  cnt++;
  e[cnt].to = v, e[cnt].nxt = head[u], head[u] = cnt;
}
bool dfs(long long u, long long fa) {
  long long du = 2;
  for (long long i = head[u]; i; i = e[i].nxt) {
    long long v = e[i].to;
    if (v == fa) continue;
    if (dfs(v, u) && du) {
      du--;
      tree_edges_count++;
    }
  }
  if (du > 0)
    return true;
  else
    return false;
}
signed main() {
  n = read(), x = read(), y = read();
  for (long long i = 1; i < n; i++) {
    long long u = read(), v = read();
    de[u]++, de[v]++;
    add_edge(u, v), add_edge(v, u);
    maxv_degree = max(maxv_degree, max(de[u], de[v]));
  }
  if (x > y) {
    if (maxv_degree == n - 1)
      ans = x + y * (n - 2);
    else
      ans = y * (n - 1);
  } else if (x == y)
    ans = y * (n - 1);
  else {
    dfs(1, 0);
    ans = tree_edges_count * x + (n - 1 - tree_edges_count) * y;
  }
  cout << ans << endl;
  return 0;
}
