#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:667772160")
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
vector<int> graph[200000 + 7];
int deg[200000 + 7];
long long ans;
bool dfs(int cur, int pre) {
  int v, left = 0, ok;
  for (int i = 0; i < graph[cur].size(); i++) {
    v = graph[cur][i];
    if (v == pre) continue;
    ok = dfs(v, cur);
    if (ok and left) ans++;
    if (ok) left++;
  }
  return left >= 2 ? 0 : 1;
}
int main() {
  int n, x, y, u, v, mx = -1;
  scanf("%d %d", &n, &x);
  scanf("%d", &y);
  for (int i = 1; i < n; i++) {
    scanf("%d %d", &u, &v);
    graph[u].push_back(v);
    graph[v].push_back(u);
    deg[u]++;
    deg[v]++;
    mx = max(deg[u], mx);
    mx = max(mx, deg[v]);
  }
  if (y <= x) {
    if (n == 2)
      ans = x;
    else if (n == 3)
      ans = x + y;
    else {
      if (mx == n - 1)
        ans = y * 1LL * (n - 2) + x;
      else
        ans = y * 1LL * (n - 1);
    }
    deb(ans);
  } else {
    if (dfs(1, -1)) ans++;
    long long fans = (ans - 1) * 1LL * y + (n - ans) * 1LL * x;
    deb(fans);
  }
  return 0;
}
