#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 200100;
vector<int> A[MAX_N];
int d[MAX_N][3];
bool viz[MAX_N];
void dfs(int nod) {
  int sum = 0;
  for (auto it : A[nod]) {
    A[it].erase(find(A[it].begin(), A[it].end(), nod));
    dfs(it);
    sum += max(d[it][0], max(d[it][1], d[it][2]));
  }
  d[nod][0] = sum;
  for (int i = 0; i < (int)A[nod].size(); i++) {
    int it = A[nod][i];
    int sumw = sum - max(d[it][0], max(d[it][2], d[it][1])) +
               max(d[it][1], d[it][0]) + 1;
    if (i > 0) {
      int sum2 = d[nod][1] - max(d[it][0], max(d[it][2], d[it][1])) +
                 max(d[it][1], d[it][0]) + 1;
      d[nod][2] = max(d[nod][2], sum2);
    }
    d[nod][1] = max(d[nod][1], sumw);
  }
}
bool isStar(int n) {
  for (int i = 1; i <= n; i++) {
    if ((int)A[i].size() == n - 1) {
      return true;
    }
  }
  return false;
}
int main() {
  int n, x, y;
  cin >> n >> y >> x;
  for (int i = 1; i < n; i++) {
    int a, b;
    cin >> a >> b;
    A[a].push_back(b);
    A[b].push_back(a);
  }
  if (y == x) {
    cout << 1LL * x * (n - 1);
    return 0;
  }
  if (y > x) {
    if (isStar(n)) {
      cout << 1LL * x * (n - 2) + y;
    } else {
      cout << 1LL * x * (n - 1);
    }
    return 0;
  }
  dfs(1);
  int ans = max(d[1][0], max(d[1][1], d[1][2]));
  cout << 1LL * y * ans + 1LL * x * (n - ans - 1);
  return 0;
}
